Questions tagged [visual-studio-debugging]

Questions related to debugging methods and tricks in VisualStudio

2287 questions
63
votes
25 answers

Visual Studio 2015 RTM - Debugging not working

I have installed VS 2015 RTM (nothing else) and I'm unable to debug any solution, not matter if it's an existing one or a brand new one (created with VS 2015 and compiled against .Net Framework 4.6), it only opens a new tab in VS which is called…
rene_r
  • 936
  • 1
  • 6
  • 15
60
votes
23 answers

msvsmon.exe crashed when debugging

When I debugging in VS2013 update3, msvsmon.exe crashed when hit at a breakpoint. It shows "The debugger's worker process (msvsmon.exe) unexpectedly exited. Debugging will be aborted". I'm not using remote debug. Is it possible to shut down the…
60
votes
1 answer

Stack traces with async/await

It's clear why stack traces are affected with Microsoft's new programming paradigm. We now have a semantic stack and a couple of physical ones (my choice of words). What I get to see is an exception's StackTrace property (and in the debugger) is the…
John
  • 6,693
  • 3
  • 51
  • 90
60
votes
23 answers

'Step Into' is suddenly not working in Visual Studio

All of a sudden, I have run into an issue where I cannot step into any code through debugging in Visual Studio. The step over works fine, but it refuses to step into (F11) any of my code. This was working before, now all of a sudden it does not.…
Nick LaMarca
  • 8,076
  • 31
  • 93
  • 152
59
votes
6 answers

From where do I reference a missing assembly (System.Net.Http.Formatting)?

In my Visual Studio 2013 RC project, I'm getting this err msg: "The type 'System.Net.Http.Formatting.MediaTypeFormatter' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Net.Http.Formatting,…
44
votes
4 answers

C# Get Name of Derived Type from Inside base Class

During a debug session, it's important for me to identify the name of the actual derived class in the debug info of specific instances. I tried using this.GetType().Name but this simply returns the type of the base class. Is there a simple way to…
Steve
42
votes
4 answers

How do I get Visual Studio to stay on one thread when debugging?

When I am debugging within Visual Studio, for some reason when debugging a certain thread, Visual Studio will just jump around to different threads. How do I change to behavior so it sits on the same thread?
rid00z
  • 1,566
  • 3
  • 16
  • 35
41
votes
3 answers

Visual Studio 2017 Debug Error: To prevent an unsafe abort when evaluating the function *.toString all threads were allowed to run

I updated Visual Studio 2017 to version 15.8.2. After this update, I started to encounter these errors while debugging: Here are the error messages: Visual Studio Debug Error: To prevent an unsafe abort when evaluating the function *.toString…
41
votes
5 answers

How to debug class library that called from external app?

There is an external workflow that executes C# scripts and is able to work with DLL files(my class library). Is it possible to attach debug to my class library project so breakpoint will hit once this WF will call it? Thanks
Sergejs
  • 2,540
  • 6
  • 32
  • 51
40
votes
7 answers

Visual Studio 2013 can't debug javascript in cshtml

I have an ASP.NET Web Application created with Visual Studio 2013. I am attempting to debug JavaScript in a CSHTML file. However, whenever I launch the webpage, any breakpoint turns into a red circle arrow and states, "The breakpoint will not…
40
votes
17 answers

ASP.NET MVC5/IIS Express unable to debug - Code Not Running

I start a VS2013 VB.Net MVC5 Web Application, set a breakpoint in HomeController About method and run "Start Debugging", navigate to About page and receive the message "Code not running - The current Thread is not currently running or the call stack…
40
votes
24 answers

VS2012 Breakpoints are not getting hit

I have a class that looks like this: public class MyService { private MyService(){} public static string GetStuff() { var stuffDid = new MyService(); return stuffDid.DoStuff(); } private string DoStuff() { …
RJP
  • 4,016
  • 5
  • 29
  • 42
37
votes
7 answers

Can't get VSCode/Python debugger to find my project modules

I have a project and am trying to debug my main.py. I am really confused why I am getting the following error from the imports at the top of my file (only) when running the debugger: Exception has occurred: ModuleNotFoundError No module named 'bbb' …
Max Power
  • 8,265
  • 13
  • 50
  • 91
36
votes
5 answers

Attaching to a child process automatically in Visual Studio during Debugging

When writing plugins for media center your plugin is hosted in ehexthost.exe this exe gets launched from ehshell.exe and you have no way of launching it directly, instead you pass a special param to ehshell.exe which will launch the plugin in a…
Sam Saffron
  • 128,308
  • 78
  • 326
  • 506
36
votes
1 answer

How to configure ASP.NET Core 1.0 to use Local IIS instead of IIS Express?

How can I setup a .Net Core 1.0 project to use Local IIS instead of IIS Express when debugging? I have tried modifying launchSettings.json file in various ways. For example, replacing all occurrences of IIS Express with Local IIS and updating the…
Oluwafemi
  • 14,243
  • 11
  • 43
  • 59