Search code examples
vb.netdebuggingidevisual-studio-2017

The application is in break mode - Unable to determine cause


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


Solution

  • 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.