- Home /
How can I attach a debugger to the code running on the editor or to the builded client
Is there a way to attach a debugger to the unity3d process?
I could not find a way do this using Visual studio 2008. Is it possible to do that using MonoDevelop?
Answer by Zyxil · Feb 13, 2011 at 05:05 PM
With Unity 3.2 this feature now exists.
You have to debug using the MonoDevelop that ships with Unity 3.2.
When you have the project open in MD, click Run > Attach to Process. Then choose the Unity editor process or your running built debug exe. If you attach to the editor, you can start and stop the game editor at any time using the "play" button or Ctrl+P.
Answer by Lucas Meijer 1 · Oct 20, 2009 at 04:50 PM
Currently the following options are available to find problems with your project:
- Debug "visually" by pausing the game, and inspecting values of scripts in the inspector
- Using Debug.Log() messages, to see where things are going wrong
- You can run your C# code in the VisualStudio debugger, but only those parts that do not interact with the Unity API.
Hopefully this will not be true for a very long time.
Your answer
![](https://koobas.hobune.stream/wayback/20220613155037im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to add watch in monodevelop? 0 Answers
Visual Studio 2015 debugger can no longer attach to Unity after installing RC3 1 Answer
Debugging unit tests with Monodevelop 0 Answers
Callback for debugger attached state change (like EditorApplication.playModeStateChanged)? 0 Answers
MonoDevelop Debug starts Unity, but not the application to debug 1 Answer