Questions related to debugging methods and tricks in VisualStudio
Questions tagged [visual-studio-debugging]
2287 questions
446
votes
21 answers
Can I find out the return value before returning while debugging in Visual Studio?
Take the following function:
DataTable go() {
return someTableAdapter.getSomeData();
}
When I set a breakpoint in this function, is there a possibility to inspect the returned value? go() is directly coupled to a datagrid in an .aspx page.
The…

doekman
- 18,750
- 20
- 65
- 86
186
votes
27 answers
SSL Connection / Connection Reset with IISExpress
I'm using the new Visual Studio 2013 with IISExpress for the first time (previously used ASP.net Development server on VS2010). I'm running into issues trying to debug my project.
This is what I see in Chrome:
Unable to make a secure connection to…

Kevin
- 3,209
- 9
- 39
- 53
142
votes
34 answers
The Following Module was built either with optimizations enabled or without debug information
I cannot get rid of this in my VS 2008 web project when debugging. I've checked that it's in debug mode on the non-web project in question and it's in Active(Debug). Deleted all items in my .NET 2.0 temp folder in Windows. Not sure what else to…
Anonymous
137
votes
8 answers
Visual Studio during Debugging: The function evaluation requires all threads to run
I'm suddenly getting a strange error while debugging. Up to now the variable in the watch windows has been showing correctly. Now I am always getting this error message in the watch windows:
The function evaluation requires all threads to run
I am…

Maik
- 1,582
- 3
- 12
- 13
128
votes
6 answers
How do I start a program with arguments when debugging?
I want to debug a program in Visual Studio 2008. The problem is that it exits if it doesn't get arguments. This is from the main method:
if (args == null || args.Length != 2 || args[0].ToUpper().Trim() != "RM")
{
Console.WriteLine("RM must be…

Kasper Hansen
- 6,307
- 21
- 70
- 106
114
votes
4 answers
Get "Internal error in the expression evaluator" on "Add watch" function when trying to debug WCF service code (MSVS 2013)
Few days ago I moved my solution to MSVS 2013. It works fine except one thing: when I trying to debug code of my WCF service it works, but when I want to watch state of any variable it says: "Internal error in the expression evaluator". Add watch…

Ceridan
- 2,376
- 3
- 23
- 32
99
votes
32 answers
Visual Studio breakpoints not being hit
I'm working with an ASP.NET MVC project that seems to be having some issues when attaching to the IIS process (w3wp.exe). I'm running the solution and IIS 8.5 on my own local machine so I wouldn't think that this has anything to do with our network.…

My Stack Overfloweth
- 4,729
- 4
- 25
- 42
96
votes
27 answers
Error: You are debugging a Release build of X.dll
Background
I have an ASP.NET MVC application project, along with various other projects within a Visual Studio solution. The different projects use various versions of the NPoco library as follows:
The MVC project includes a version of NPoco…

Sam
- 40,644
- 36
- 176
- 219
92
votes
31 answers
Unable to start debugging on the web server. Could not start ASP.NET debugging VS 2010, II7, Win 7 x64
I am running Visual Studio 2010 (as Admin), IIS 7 on Windows 7 x64.
I am able to run the ASP.NET web site in IIS 7 without debugging just fine, but when I press F5 to debug it, I get:
Unable to start debugging on the web server. Could not start…

Dan C
- 2,236
- 2
- 19
- 30
89
votes
10 answers
Connecting to Visual Studio debugging IIS Express server over the lan
I have a test ASP.NET MVC3 application developed in VS2012. When I start debugging the app is accessed from the host machine via the request to http://localhost:. But if I try to access the same application from the remote machine in the…

gator88
- 1,203
- 2
- 11
- 14
74
votes
5 answers
Visual Studio: Debugging a referenced DLL, I have source in another SLN
I am trying to debug a project that has a reference to a DLL that I added, the DLL is stored in an external directory and I just added a reference. Now of course I can debug my project but the line that calls a method on my other dll I can't step…

Martin
- 23,844
- 55
- 201
- 327
73
votes
3 answers
Debugger not breaking/stopping for exceptions in async method
When a debugger is attached to a .NET process, it (usually) stops when an unhandled exception is thrown.
However, this doesn't seem to work when you're in an async method.
The scenarios I've tried before are listed in the following code:
class…

Sebastian Krysmanski
- 8,114
- 10
- 49
- 91
72
votes
33 answers
Visual Studio - suddenly cannot debug tests
I'm not sure what I did, but all of a sudden, my Visual Studio 2012 will not debug any tests.
If I select a test from the Test Explorer and tell it to run, it simply outputs this in the Test Output window:
> ------ Discover test started ------
>…

SelAromDotNet
- 4,715
- 5
- 37
- 59
65
votes
2 answers
Disable noise messages in debug output windows - visual studio 2012
How do I disable messages in the debug output windows of visual studio 2012?
The thread '' (0x2360) has exited with code 0 (0x0)
Since the count of such messages is so high they bother me and hide my custom debugging information written using…

Maxim Yefremov
- 13,671
- 27
- 117
- 166
64
votes
7 answers
Visual Studio 2015 diagnostics tool does not support current debugging configuration
After using VS2015 snapshot and profiling tools, I can't seem to get the diagnostics tools to work again. Every project, even new ones just say the following
The Diagnostic Tools window does not support the current debugging
…

garyamorris
- 2,587
- 2
- 17
- 23