x


Does Mono Develop Support Breakpoints with Inspection?

I am an avid Visual Studio user, and have been frustrated by the lack of debugger support that it has for Mono (on Windows). With Unity code (running on Mono), I am unable to set breakpoints in my C# code! Therefore, I cannot do inspection, and therefore, I cannot do any form of modern debugging that those with .NET have become accustomed to (which also includes the elegant "edit-and-continue" capability, which is amazing).

Will MonoDevelop provide me with any advantages over Visual Studio when working with scripts (or assemblies) running in Unity under Mono. I have dropped in a number of .NET DLL's into the Assets/Plugins folder for use by scripts... which was exciting, until I realized that I can't debug anything! (unless you resign yourself to "Debug.Log()" statements added everywhere, which reminds me of "debugging from the early 1990's).

Please help. I'm experiencing significant frustration and let-down here with the overall coding environment that I have encountered so far.

more ▼

asked Dec 20 '09 at 05:24 AM

adam michaels gravatar image

adam michaels
693 21 26 30

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

3 answers: sort voted first

Unity 3 (currently in beta) now solves this. The entire Unity IDE can be run (along with your scripts) in MonoDevelop. The IDE is just a bunch of assemblies, so you don't debug those, but you can put breakpoints in your scripts, examine variables, etc.

It's pretty easy to set up. The manual has instructions, or you can check out this video.

more ▼

answered Sep 11 '10 at 12:19 AM

Bampf gravatar image

Bampf
5.1k 8 20 49

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

MonoDevelop doesn't bring you anything over VIsual Studio (today). To get the best possible debugging / unit testing experience you can get currently, design your code in such a way that as little as possible code actually touches UnityEngine. If you look at something like path finding, dialog trees, game rules etc, there's no reason why that has to directly depend on UnityEngine types. By keeping your code as seperated as you can, it means you can put the code into a seperate assembly (and drop it into the assets folder), but you can write unit tests (and debug those), from visualstudio, with the visual studio debugger.

more ▼

answered Dec 20 '09 at 10:44 PM

Lucas Meijer 1 gravatar image

Lucas Meijer 1 ♦♦
8k 19 43 85

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

I, too am a longtime visual studio developer that is going insane with Debug.Log

one thing that really helps is splitting your code as described above so you can test the logic independantly.

The best way to set it up is described here. : Setting Up Visual studio for Unity

Even though I am on a mac, I have a visual studio project running in parallels using the linking plug-in they describe so I can code in visual studio.

My scripts are setup so that from visual studio they are in a DLL. Then I have a test project that tests various aspects of the code and allows me to walk through all of the "logic" aspects, do refactoring, code completion, etc.

it still isn't great, but it is a whole lot better than forever doing debug.log.

Hopefully future versions will take care of the frustration.

more ▼

answered Jan 26 '10 at 04:40 AM

thom gravatar image

thom
119 2 4 9

(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:

x398
x249

asked: Dec 20 '09 at 05:24 AM

Seen: 7076 times

Last Updated: Feb 23 '10 at 09:35 AM