[Mono-dev] Unable to debug
charlie at nunit.com
Thu Feb 2 20:00:22 UTC 2012
I've run into a similar problem - a null reference due to the Resize
earlier than I expected. I had to add some null reference checks to my handler
as a result. I imagine you'll have to do the same once you get the debugger
I imagine you are sticking with the Ubuntu-supported version of MD. I did
that for a long time and suffered from lots of debugging issues. When I
finally decided to build MD from source, it turned out to be trivial and I
felt a bit silly for waiting so long.
As a workaround, however, you could consider a sort of binary search:
comment out half the code in your handler and see if you still get the error,
then comment out a quarter of the code, etc.
On Thu, Feb 2, 2012 at 11:18 AM, Nogginboink <mono at companies.mucker.net> wrote:
> I am new to Mono. I have written a C# app in Visual Studio 2005 that works
> fine when run under Windows. However, when I launch the app under Mono I get
> a divide by zero exception in the Resize() event handler of a usercontrol
> that I wrote. (I surmise that Mono is calling the Resize event at startup
> when Windows doesn't. I fully believe the divide by zero error is in my
> I am running MonoDevelop version 2.2.1 on Ubuntu 10.04. According to Ubuntu
> Software Center, I have mono-debugger version 2.4.3-2 and
> monodevelop-debugger-mdb version 2.2.1-1 installed . In the MonoDevelop
> Add-in Manager, I see two debugging add-ins: MDB support for Mono.debugging
> version 2.2, and Asp.Net Debugging Support version 2.2 I am able to load my
> VS2005 solution in MonoDevelop.
> The Run menu has an option for Debug, but Step Over, Step Into, etc. are
> greyed out. When I set a breakpoint and select Debug from the run menu, I
> get the exception record in the Application Output window in MonoDevelop,
> but I had expected source-code debugging to be triggered when the exception
> was hit, and the offending line to be displayed in the code editor.
> I'm afraid that I don't know what I'm doing wrong here. I'm reasonably
> certain that I didn't configure something properly, but I've no idea what
> that something might be. Can anyone help me figure this out?
> (Oddly, I have also noticed that calls to
> System.Diagnostics.Debug.WriteLine() don't send output to the Application
> Output window, either. Is this expected?)
> I sincerely appreciate any help that the group could offer. Thanks in
> View this message in context: http://mono.1490590.n4.nabble.com/Unable-to-debug-tp4352493p4352493.html
> Sent from the Mono - Dev mailing list archive at Nabble.com.
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
More information about the Mono-devel-list