• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.
  • The forums have been upgraded with support for dark mode. By default it will follow the setting on your system/browser. You may override it by scrolling to the end of the page and clicking the gears icon.

Visual Studio 2010 debugging problem

Joined
Dec 22, 2007
Messages
184 (0.03/day)
Location
Central Nebraska
System Name CORSAIR
Processor AMD Phenom 1090T x6 @3.2
Motherboard Gigabyte Ga-78LMT-S2P
Cooling High efficiency dust cooling
Memory 8GB GSkill DDR3 1333
Video Card(s) Sapphire Radeon HD3870 512MB GDDR4 PCI-e toxic
Storage Seagate SV35.3 ST3250310SV 250GB SATAII(Windows 7 Pro x64), 320GB Samsung SATAII(Storage and SuSE)
Display(s) Dell 20" LCD, Dell 17" LCD
Power Supply Antec Cool Blue 650W Modular
Software Windows 7 Professional SP1, Visual Studio 2010 Ultimate
I have a strange issue someone may have come across before.

Usually when running my code in debugging mode (clicking "play"), anytime the program crashes, visual studio lets me know why, even highlights the line the problem is at.

However the past couple of days, when an app crashes, it simply closes and that's it. No information is given at all.

Any ideas?
 
I might be terribly mistaken on this, but I believe when your program crashes, it shows you the error only if you're catching an exception. I'm almost certain I'm wrong on this...lol.

Either ways, try setting breakpoints to zero in on the problem code.
 
a) Make sure you are running in debug mode.
b) Are you certain your application isn't terminating peacefully? For example, console applications do this if nothing is keeping them alive (like a ReadKey() or an infinite loop).
c) Generic, untraceable crashes can occur when using unmanaged code. For example, if you are using a 3rd party DLL, it can be causing a crash outside of the managed code so your program simply closes.
d) ErrorLevel is set too low in Visual Studio.
e) An anti-virus or some other program is terminating it after it starts and not reporting that it did.
 
Thanks for the replies guys, I'll try and look at all this when I get home from work today. I'll let you know.
 
I might be terribly mistaken on this, but I believe when your program crashes, it shows you the error only if you're catching an exception. I'm almost certain I'm wrong on this...lol.

Either ways, try setting breakpoints to zero in on the problem code.

Before, It would show where the crash happened without me setting up a try/catch. I jsut don't understand what changed. Never had to set break points either.
 
Did you change anything in the environment settings?
Did you install a program before the problem happened?

To reset your settings

On the Tools menu, click Import and Export Settings.

On the Welcome to the Import and Export Settings Wizard page, click Reset all settings and then click Next.

If you want to save your current settings combination, click Yes, save my current settings, specify a file name, and then click Next.

or

If you want to delete your current settings combination, choose No, just reset settings, overwriting my current settings, and then click Next. This option does not delete default settings, which will still be available the next time you use the wizard.

In Which collection of settings do you want to reset to, select a settings collection from the list.

Click Finish.

The Reset Complete page alerts you to any problems encountered during the reset.
 
I had a problem with VS one time where the the debugger started doing strange things, but only in a particular project.
It turned out that the solution files got corrupted.
I had to create another project and import (add->existing) all of the code files to the new projects. After that it worked just fine.
Something to try if nothing else works for you.

I might be terribly mistaken on this, but I believe when your program crashes, it shows you the error only if you're catching an exception. I'm almost certain I'm wrong on this...lol.

You are correct in that you are wrong :D
The debugger catches unhandled exceptions and runtime errors.
Try/Catch blocks are so you can handle the exceptions gracefully (or not so gracefully. lol)
As Ford noted, though, there are cetain conditions where the debugger has no clue what to do so it just kills the running process.

If you are running outside of the debugger, the OS will throw an exception, but it too just kills the process under certain conditions.

When both the debugger and the OS fail to throw an exception, the first thing that usually happens is the developer/coder yells, WTF!
This can be embarassing if you are at work or writing code in your church's computer room and the Pastor just walked in. :laugh:
 
Last edited:
Back
Top