Visual Studio 2015 RTM - Debugging not working

2019-01-08 07:02发布

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 Break Mode with the following text: The application is in break mode Your app has entered a break state, but no code is executing that is supported by the selected debug engine (for e.g. only native runtime code is executing). And if I check the Debug --> Module Window: VS2015Test.vshost.exe no symbols loaded (even if I click load symbol it does not work) VS2015Test.exe symbols loaded

And it also doesn't show the output on the console(it's a console application that just has the following lines of code:

class Program
{
        static void Main(string[] args)
        {
            Console.WriteLine("TEST");
            Console.ReadKey();
        }
    }

I tried to reinstall VS 2015, restarted the computer, deleted all files in %temp%/AppData/Microsoft/Visual Studio/14, started VS in Admin Mode but nothing seems to work.

One thing which makes debugging working is this option: Tools --> Options --> Debugging --> Use Managed Compability Mode

^^But that can't be the solution to use an old/legacy mode.

BTW: Debugging in VS 2013 is working fine.

Any help would be appreciated.

25条回答
地球回转人心会变
2楼-- · 2019-01-08 07:33

I got in this issue as well. I'm using VS 2015 (Update 3) on Windows 10 and I was trying to debug a Windows Forms Application. None of the suggestion worked for me. In my case I had to disable IntelliTrace:

Tools > Options > IntelliTrace

I dont know the reason why, but it worked. I found out the root of the problem when I opened the Resource Monitor (from Windows Task Manager) and I realized that IntelliTrace process was reading a tons of data. I suspect this was causing locks in vshost process, because this one was consuming 100% of a cpu core.

查看更多
Summer. ? 凉城
3楼-- · 2019-01-08 07:33

I had a very similar issue recently, related to debugging settings.

Firstly have you tried resetting all your settings? I think it may be related to that as you say it is project independent and you've deleted all application data.

Tools-> Import and Export Settings Wizard -> Reset all settings

Don't worry, it gives you the option to save current settings.

Secondly if this fails, I would suggest looking at the event log.

Entering break mode would suggest that the DE (debug engine) is sending a synchronised stop event to visual studio like IDebugExceptionEvent2. I would take a look at the event log for exceptions like failures in loading referenced assemblies (like .NET runtimes, etc) or environment access restrictions.

Something is telling the debugger to stop your running application, its just a case of finding it.

查看更多
Animai°情兽
4楼-- · 2019-01-08 07:33

In my case,

I have changed Platform from x86 to x64 in Debug Configuration Manager. It worked for me.

查看更多
三岁会撩人
5楼-- · 2019-01-08 07:34

In my case this solution is useful:

Solution: Disable the "Just My Code" option in the Debugging/General settings.

enter image description here

Reference: c-sharpcorner

查看更多
Root(大扎)
6楼-- · 2019-01-08 07:34

Uhg. I hit the bottom of this page so I started ripping apart my project. I found a solution for my particular problem.

My Issue: I couldn't hit the break-point inside a threaded process. Nothing fancy, I'm just starting a new thread in a console app and the debugger wasn't stopping on the break points. I noticed the thread was being created but it was getting hung up in .Net Framework external calls and specifically the ThreadStart_Context. That explains why my breakpoints never got hit because the .Net Framework is getting hung up something.

The Problem: I found that I could solve this by changing my startup code. For whatever reason, I had a program.cs file that contained Main() and was inside the Program class as you would expect for a console app. Inside Main(), I was instantiating another class via this code;

new SecondClass();

This normally works fine and I have a bunch of other projects with Threaded calls where it works fine (well, I haven't debugged them for some time so perhaps a service pack came along and is causing this regression).

The Solution: Move Main() into my SecondClass and instead of invoking the SecondClass constructor via 'new SecondClass()', update the SecondClass constructor to be a standard static method and then call it from Main. After making those changes, I am able to debug the thread once again.

Hope this helps.

查看更多
甜甜的少女心
7楼-- · 2019-01-08 07:34

After installtion of vs 2017,while debugging the solution,there was an error like "Webkit has stopped functioning correctly; Visual Studio will not be able to debug your app any further.",this makes unable to proceed the debugging.To resolve this issue,Go to Tools->Options->Debugging->General then disable the javascript debugging for asp.net

查看更多
登录 后发表回答