x


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?

more ▼

asked Oct 20 '09 at 03:47 PM

Daniel Sperry 2 gravatar image

Daniel Sperry 2
677 11 15 30

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

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.

more ▼

answered Feb 13 '11 at 05:05 PM

Zyxil gravatar image

Zyxil
387 5 7 16

(comments are locked)
10|3000 characters needed characters left

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.

more ▼

answered Oct 20 '09 at 04:50 PM

Lucas Meijer 1 gravatar image

Lucas Meijer 1 ♦♦
8k 19 43 85

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x249
x52

asked: Oct 20 '09 at 03:47 PM

Seen: 2117 times

Last Updated: Oct 20 '09 at 05:28 PM