Visual Studio 2015 项目不再在调试模式下运行 [英] Visual Studio 2015 project no longer runs in debug mode

查看:26
本文介绍了Visual Studio 2015 项目不再在调试模式下运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这就是我在调试配置中运行时得到的结果:

This is what I get even when I run in the Debug configuration:

我显示此内容的方法是启用仅我的代码",如果启动时没有任何用户代码,则发出警告.这是我们项目最近发生的事情,我不确定我们做了什么导致这种情况.但我一直无法修复它.断点不会触发,快速观察会产生奇怪的结果.

The way I got this to show was by enabling "Just My Code" and warn if there isn't any user code on launch. This is something that recently happened to our project, and I'm not sure what we did to cause this. But I've been unable to fix it. Breakpoints won't fire and quick watch gives weird results.

我试过在谷歌上搜索这个问题,但没有一个标准的断点不会触发";解决方案已经奏效.我已经没有想法了.

I've tried googling the issue, but none of the standard "break points won't fire" solutions have worked. I'm all out of ideas.

我已经检查了配置管理器,每个项目也都在那里设置为调试.

I've checked the configuration manager and every project is also set to Debug there as well.

我关闭了启用优化",并且不再收到您正在调试发布版本"的提示信息.对话.它再次运行并在断点处停止!然而,输出窗口在启动时显示:

I turned off "Enable Optimaizations", and I no longer get the "you are debugging a Release build" dialog. It runs and stops on breakpoints again! However the output window displays this at start up:

未加载模块Navigo.exe"的符号.

Symbols for the module 'Navigo.exe' were not loaded.

  1. 使用调试版本配置或禁用调试选项启用仅我的代码".
  2. 检查调试选项下的符号"设置.

所以这解决了我的主要问题,即不再能够使用断点和弹出窗口.这很奇怪,因为我认为您需要加载符号才能使断点工作.那么如果没有加载符号,断点如何工作呢?也许这只是一个坏消息?

So this solves my primary problem of no longer being able to use breakpoints and the popup. Which is odd since I thought you needed symbols to be loaded for breakpoints to work. So how can the breakpoints work if the symbols aren't loaded? Maybe it's just a bad message?

推荐答案

使用配置管理器检查调试配置的实际设置 - 它位于菜单 BuildConfiguration Manager... - 如果他们被设置为使用 Release:

Use the Configuration Manager to check what the actual settings are for the Debug configuration - it's at menu BuildConfiguration Manager... - in case they are set to use Release:

此外,请确保项目正确定义了DEBUG,并且未选中优化代码":

Also, make sure the project is defining DEBUG correctly, and that "Optimize Code" is not checked:

这篇关于Visual Studio 2015 项目不再在调试模式下运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆