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:19

Just change your Configuration from Release to Debug

from Solution Explorer -> Web -> Properties

select Build tab -> Configuration combobox:

Just change your Configuration from "Release" to "Active (Debug)"

查看更多
Rolldiameter
3楼-- · 2019-01-08 07:19

Check the "Code Type" before attaching to a Process. For example, I had to switch from CoreCLR to v4.*

Select Code Type

查看更多
成全新的幸福
4楼-- · 2019-01-08 07:20

My solution suddenly stopped to work in debug. I received a message during debug. I received a message during debug

[Window Title] Microsoft Visual Studio [Main Instruction] You are debugging a Release build of NettoProWin.exe. Using Just My Code with Release builds using compiler optimizations results in a degraded debugging experience (e.g. breakpoints will not be hit). [Stop Debugging] [Disable Just My Code and Continue] [Continue Debugging] [Continue Debugging (Don't Ask Again)]

I chose to continue to debug, but it still did not work.

The solution was simple. It is necessary in the project properties -> in the build section -> remote the check "Optimiz code" enter image description here

查看更多
放荡不羁爱自由
5楼-- · 2019-01-08 07:21

I hade the same problem. After trying the other solutions here without luck, I had to repair the installation through the installer.

Control Panel > Programs > Programs and Features

Then scroll down to Microsoft Visual Studio, right click it, then "Change". Then at the bottom of the window, click Repair. The repair process will take a decent amount of time, and at the end you will have to restart your computer.

This fixed the problem to me, and I hopes it will help you.

查看更多
我想做一个坏孩纸
6楼-- · 2019-01-08 07:22

Thought I would post this in case it helps anyone. I installed a clean Win 10 and Visual Studio 2015, tried to debug an existing solution and had problems. Followed some advice listed here and other places but none worked.

How I got the debugging to work as normal was to change the Solution Configuration just below the menus. I had it set previously to Release mode, changed this to Debug and then cleaned/recompiled and hey presto, debugging started working as normal. See the image for info:

enter image description here

查看更多
Explosion°爆炸
7楼-- · 2019-01-08 07:23

I changed my Platform Target from "Any CPU" to "x64".

Setting available at : Project Properties -> Build -> General: "Platform Target"

I use VS 2015.

查看更多
登录 后发表回答