Debugger

Debugger

I just started playing around with this… I am intrigued with the way it interacts with the Unity Engine. I found a small section in the Unity Manual on the Debugger.

I first opened the Unity Engine with the 2D Gameplay Tutorial Project. Next I selected in the Assets Menu the Sync MonoDevelop Project. This opened the Debugger with all the script files belonging to the project. I toggled a breakpoint on the LevelAttributes.js file which afterwards I selected the gears button which started the debugging. I noticed it opened a second unity engine for debugging. Is this normal to have two unity engines open at the same time?

By the way, I think I am going to enjoy debugging unity this way… Is there a tutorial for the debugger?

MageArt hacking Unity…:sunglasses:

don’t open the editor on its own if you want to debug as the debugger will indeed open an own instance

In response to dreamora:

Sorry, could you be a bit more descriptive. Thanks.

When you say “editor”, do you mean the editor in the game engine or debugger?

MageArt hacking Unity…

With “editor” I mean: Don’t start unity if you want to debug in the session. just start monodevelop and start debugging from there.

if you want to design and implement your game but not debug, then start the unity editor directly and start monodevelop later as code editor (don’t start it from there / don’t start debug)

In response to dreamora:

Thanks.

I recently started up again in using Unity. I first start up unity and sync monodevelop. I find it convenient to edit my code in the debugger while working at the same time within the Unity Engine. So, is it so BAD to debug while initially having an Unity Engine already opened? That is, is it so BAD to have two Unity Engines running!? Or will this cause a system crash!?

MageArt hacking Unity…

In order for the debugging breakpoints to work, Unity needs to be closed to begin with. AFAIK, MonoDevelop will launch Unity in a special debugging session for the breakpoints.

Other than that requirement, you can debug (without breakpoints), edit, work however you want.