Questions related to debugging methods and tricks in VisualStudio
Questions tagged [visual-studio-debugging]
2287 questions
19
votes
1 answer
How to set "Break on All Exceptions", from a Package
I want to make an extension to quickly toggle breaking on CLR exceptions in debugger.
I have made tried several approaches, neither of which is satisfactory.
Here is what I have already tried:
ExceptionSettings.SetBreakWhenThrown (MSDN)
This is…

Andrey Shchekin
- 21,101
- 19
- 94
- 162
19
votes
1 answer
Permanently enable just my code
I'm using visual studio 2010, and every time I open it, "just my code" under tools->options->debugging is disabled. Does anyone know how to permanently enable this?
I have the following extensions enabled if this makes any difference:
.NET reflector…

Sean Reid
- 911
- 9
- 19
19
votes
2 answers
What is different between visual studio F5, ctrl+F5, or running outside of visual studio?
I have written a program in vc++ that has different behavior in various case as below.
When I run it by F5 it works properly in release mode.
When I run it by ctrl + F5 it crashes when I start to send data to the program.
Outside of visual studio it…

herzl shemuelian
- 3,346
- 8
- 34
- 49
18
votes
8 answers
Debugging Azure: Error attaching the debugger to the IIS worker process
I have a web application asp.net to deploy to Windows Azure. I try to run it on local first. But when debugging, I catch this error from VS2010:
"There was an error attaching the debugger to the IIS worker process
for URL 'http://127.255.0.0:82/'…

Mide
- 233
- 1
- 3
- 7
18
votes
6 answers
Debugging release build on a client's machine
We have a native C++ Win32 .exe built using Visual Studio 2005 that works flawlessly on all the machines we've tested in-house on (XP 32-bit, Vista 32-bit & Windows 7 64-bit). But of course, it crashes repeatedly on a client's 32-bit Vista…

Praetorian
- 106,671
- 19
- 240
- 328
18
votes
8 answers
Unable to debug Blazor hosted webassembly 3.2.0 from Visual Studio 2019 16.6.2
I have Visual Studio 2019 16.6.2 installed, along with the .NET Core 3.1.301 SDK and all the necessary Blazor templates.
If I create a brand new Blazor WebAssmbly application, I can run it from Visual Studio by pressing Ctrl+F5 and it opens a new…

Sergi Papaseit
- 15,999
- 16
- 67
- 101
18
votes
1 answer
Debug .NET Core source
I use Visual Studio 2019 and a .NET Core 3 web application. I'd like to debug .NET Core source code, so when an error occurs I can dive into the code and examine it in more detail. As I couldn't find an exact description on how to do it (even on the…

Marko
- 1,502
- 5
- 21
- 40
18
votes
2 answers
How to watch all variables when debugging in Visual Studio 2012
Is there a way to watch all variables when debugging in Visual Studio 2012 like i can do it in IntelliJ Idea 12? I have a window with all the variables(both global and local) when debugging in Idea and i want the same thing in VS 2012 (Autos window…

Dobrobobr
- 8,216
- 4
- 17
- 18
18
votes
1 answer
Debugging exceptions in a Async/Await (Call Stack)
I use the Async/Await to free my UI-Thread and accomplish multithreading. Now I have a problem when I hit a exception. The Call Stack of my Async parts allways starts with ThreadPoolWorkQue.Dipatch(), which doesn't help me very much.
I found a…

Patrick
- 264
- 2
- 11
17
votes
3 answers
Why does Visual Studio fail to set a conditional breakpoint on this simple C# property?
In my C# object, I set a conditional breakpoint with the condition value == "Status" in the setter of this property. Normally it's decorated with a PostSharp aspect, but I've commented that out in this case, and it's still having trouble.
public…

Tullo_x86
- 2,573
- 25
- 27
17
votes
2 answers
VS2022: "Diagnostic Tools" window no longer appears during debugging, can't bring it back
I must have fat-fingered something to turn it off, but when I try to run any c# project (.net 6 windows wpf, or even just a commandline application) in debug mode, I no longer see the Diagnostic Tools window. This is the thing that displays a…

Angelo
- 2,936
- 5
- 29
- 44
17
votes
3 answers
How to package and deploy a NuGet package with symbols and source code so that debugger can use THAT source code?
I have created a very simple NuGet package from a .net framework visual studio Class Library project, where the class library source is in C#.
I used this command to create the nuget package:
nuget pack MyProject.csproj -symbols -Properties…

Stephan G
- 3,289
- 4
- 30
- 49
17
votes
3 answers
Is there a way to prevent Visual Studio from breaking on exceptions in a specific method?
I know I can control the way Visual Studio handles exceptions according to their type and to the fact that they're eventually caught using the "Exception" dialog.
However, I've got a library that's internally throwing (and catching) an …

Brann
- 31,689
- 32
- 113
- 162
17
votes
1 answer
"PDB format is not supported" with .NET portable debugging information
The last couple of days I've been hunting down a problem - with the conclusion:
My Visual Studio 2017 debugger can't work with PDBs in "portable" format in .NET Framework projects.
With portable format I mean going to a project's settings, then to…

Sebastian Krysmanski
- 8,114
- 10
- 49
- 91
17
votes
8 answers
I am looking for a proper way to display a UUID via NatVis in VS2012
I am looking for a proper way to display a UUID via NatVis in VS2012. My own uuid type uses UUID big-endian internally so a cast to (GUID*) does not work as GUID uses little-endian in Windows. So I always see a misrepresented uuid.
Furthermore any…

HelloWorld
- 2,392
- 3
- 31
- 68