The application is in break mode - Unable to determine cause

55,642

Solution 1

I didn't find any way to actually debug the problem. I solved the problem the bruteforce way:

I removed all assemblies and COM objects one by one until the error was gone.

In my case, I had a public control with a WithEvents in a module. It seems that VB.NET didn't like that at all. From now on, I will put the control and its withevent in a form.

The main problem however remains: Visual Studio doesn't offer any help to isolate the problem easily.

Solution 2

You may not be able to see the code where the exception happens if it's a part of a library or something else not written by you. The following might help:

Debug > Options > General > Uncheck "Enable Just My Code"

Solution 3

In one of my web applications I had the same issue, to find out what was wrong,after searching for similar issues, most suggested changing my debugging options. So in the debugging options, under general, I marked the second option "Break all processes when one process breaks" and nearly at the bottom, "Enable native Edit and Continue"; "Apply changes and Continue".

With this, my app finally stopped where I had the issue (Illegal characters in a string which ajax did not like) and was able to evaluate the values and find out what was wrong, edit the code on the go till it worked. Here's a screenshot of my debugger options. Hope you catch your bug:)

Debugger options

Solution 4

When you are in the debugger you can navigate to watch window and use pseudovariables to display some information about the root cause. One particularly useful is $exception.

enter image description here

Check document about pseudovariables.

Solution 5

Go to exception settings and uncheck "Magaged Debugging Assistants" enter image description here

Share:
55,642
tmighty
Author by

tmighty

Updated on August 29, 2021

Comments

  • tmighty
    tmighty over 2 years

    I'm experiencing that the IDE breaks sometimes when my application terminates.

    When this occurs, the call stack is empty, and the thread list shows some threads which don't reveal any information to me.

    When I choose "Debugger"-"Step into", the IDE quits / terminally seemingly normally, so I don't see how I could further investigate what causes the breaking.

    Clicking "Check for running Tasks" doesn't display any tasks. Clicking "Continue executing" quits debugging seemingly normally. Clicking "Show diagnostic tools" shows the event "Stop at Execution: Stopped at Execution", which doesn't tell me any more.

    A screenshot is attached.

    How can I investigate what's causing this break?

    enter image description here

    Edit: I've tried what one forum member suggested, but that wouldn't result in anything that would help me, I think. This is a screenshot:

    enter image description here