[Mono-dev] Mono Soft Debugger

Mikael Lyngvig mikael at lyngvig.org
Sat Feb 26 01:00:26 EST 2011


That's precisely what I have done over and over again (one more time 
after receiving this email).

I use File/Open to open an executable that uses a "statically linked" 
assembly and a bunch of dynamically loaded assemblies.  Then I set up a 
breakpoint right at the beginning of Main().  Then I hit Ctrl-F5 (Run) 
and, voila, the program runs to its completion, showing a help text in 
the program output window in the bottom of MonoDevelop.  The only thing 
that changes if I use "Run/Debug" instead of "Run/Run" is that a window 
flashes by briefly and then the program is done.

By the way, I am using Windows x64 as my platform.  Also, I have noticed 
the weird thing that once I open an executable, the solution browser 
only shows a single source file - and a single class.  I suppose it 
should show all the sources and all the assemblies being used by the 
program?  I don't know if there's a silent assumption somewhere that I 
ought to be using MonoDevelop on Linux?

I've checked and cross-checked that I am compiling with debug info - for 
each assembly, there's a corresponding .mdb file with the same date/time 
as the assembly itself.

I am not saying that this cannot be my fault, but I have tried in many 
ways and many variations - with the result result each time: The 
application runs to its completion without heeding any breakpoints and 
without giving me a chance to step through my code.


Cheers,
Mikael

Den 26-02-2011 06:45, Miguel de Icaza skrev:
>> I just have a single, minor issue that I don't seem capable of solving:
>> When I open an application using the Debug/Debug Application menu item,
>> it opens the application, runs it immediately and therefore does not
>> allow me to set breakpoints and single-step the program.  I have tried
>> opening a source file beforehand and setting a breakpoint, but that
>> doesn't seem to work either.
>>
>> Is there a chance that MonoDevelop could be altered so that it set up a
>> breakpoint on Main the very moment that the application is loaded?  That
>> way, one could debug using MonoDevelop and I could perhaps spend some
>> time helping out on MonoDevelop instead of wasting a lot of time on
>> reinventing the wheel.
> This probably needs to be better documented.
>
> Use File/Open and navigate to your executable.   Open the executable,
> this will create a solution and it will automatically show you the
> source files that the executable depends on (as long as you compiled
> with -debug).
>
> Set breakpoints, and start your program.
>
> Miguel
>



More information about the Mono-devel-list mailing list