Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

visual studio exits debugging without any exception or error

I have a TCP/CLIENT game server project in Visual Studio 2010. When I start the project in debug mode, some time later (sometimes 1 day, sometimes 1 week) Visual Studio quits debugging without any exceptions or errors. I checked the windows and application log and there is nothing unexpected there.

How can I find out what the real problem is or what (e.g. some exceptions like stackoverflow) can cause the Visual Studio exit debugging?

like image 324
Uğur Büyükköy Avatar asked May 28 '13 11:05

Uğur Büyükköy


People also ask

How do I fix unhandled exception in Visual Studio?

To change this setting for a particular exception, select the exception, right-click to show the shortcut menu, and select Continue When Unhandled in User Code. You may also change the setting for an entire category of exceptions, such as the entire Common Language Runtime exceptions).

How do I keep debugging in Visual Studio?

In most languages supported by Visual Studio, you can edit your code in the middle of a debugging session and continue debugging. To use this feature, click into your code with your cursor while paused in the debugger, make edits, and press F5, F10, or F11 to continue debugging.

How do I fix Debug target in Visual Studio?

Go to Build > Configuration Manager, and make sure the project has selected the Build. Then rebuild the project and see. If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

How do I stop Visual Studio from breaking on exception?

To turn off stop on exceptions press " Ctrl + Alt + E ". This will open the Exceptions window . Untick "Common Language Runtime Exceptions - Thrown". That would prevent it from pausing from within the delegate, but not when it's rethrown on Wait .


1 Answers

I assume that your application is multithreaded. In that case uncaught exception in a background thread will crash your application. It will stop your debugger as well since it can't debug all threads at a time and should be manually swiched to a specific thread using Threads window. So the solution is to catch the exceptions in async handlers and at least log them.

like image 118
OpenMinded Avatar answered Nov 14 '22 03:11

OpenMinded