Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set Visual Studio as the default post-mortem debugger?

Not too long ago, I had a problem which required me to set WinDbg.exe as the default post-mortem debugger. Now that I've fixed that and am back doing normal work, it would be really nice if I could set VS to be my default post-mortem debugger. How does one go about doing this?

Also, how do I make VS attach to an already existing session? That is, I've got my VS project open in one window, and a command line open where I'm launching my program from. If the program crashes, how do I get VS to figure out to attach the debugger to the active line in the project that's already open?

like image 287
Nik Reiman Avatar asked Oct 13 '08 10:10

Nik Reiman


People also ask

How do I change the debugger in Visual Studio?

To set Visual Studio debugger options, select Tools > Options, and under Debugging select or deselect the boxes next to the General options. You can restore all default settings with Tools > Import and Export Settings > Reset all settings.

How do I set WinDbg as default debugger?

To set the postmortem debugger to WinDbg, run windbg -I . (The I must be capitalized.) This command will display a success or failure message after it is used. To work with both 32 and 64 bit applications, run the command for the both the 64 and 32 debuggers.

How do I set Debug path in Visual Studio?

In Solution Explorer, right-click the project and choose Properties. In the Configuration list, choose Debug or Release. In the side pane, choose Linker > Debugging, then select options for Generate Debug Info. In most C++ projects, the default value is Generate Debug Information (/DEBUG).

How do I enable debugging in Visual Studio?

In the Visual Studio toolbar, make sure the configuration is set to Debug. To start debugging, select the profile name in the toolbar, such as <project profile name>, IIS Express, or <IIS profile name> in the toolbar, select Start Debugging from the Debug menu, or press F5.


1 Answers

You can re-enable Visual Studio for Just-In-Time debugging from within Visual Studio:

Go to the Tools | Options | Debugging | Just-In-Time dialog. Then make sure all Native and Managed (if you're debugging a .NET application) are checked. Next time you get a crash, the Visual Studio Just-In-Time debugger will come up.

The Visual Studio Just-In-Time debugger let's you choose whether you want to open a new instance of Visual Studio or start debugging with a currently open solution.

like image 194
Josh Sklare Avatar answered Sep 20 '22 08:09

Josh Sklare