Visual Studio的C#调试器 - 断点将目前尚未受到打击 [英] Visual studio C# debugger - the breakpoint will not currently be hit

查看:271
本文介绍了Visual Studio的C#调试器 - 断点将目前尚未受到打击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个问题已经被问了几次,很多人在这里建议不同的答案。虽然他们都不为我工作。

I know that this question have been asked several times and many people here have suggested different answers. Though none of them are working for me.

我创建了一个窗户的VisualStudio和框架4.0窗体应用程序,并添加一个断点。然而,当我调试应用程序,一个感叹号出现断点和它说..

I created a windows forms application with Visualstudio and framework 4.0 and added a breakpoint. However, when I debug the application, an exclamation mark appears on the breakpoint and it says..

断点将目前尚未受到打击。没有可执行的代码与此线路关联。可能的原因包括:条件编译或编译器优化

The breakpoint will not currently be hit. No executable code is associated with this line. Possible causes include: conditional compilation or compiler optimizations.

我已经尝试了一些建议的解决方案

I have tried out several suggested solutions


  • 清理项目

  • 删除了PDB

  • 选中的配置,并确保它是调试

  • 从86到任何CPU

  • 试图从头开始创建项目设置调试配置

  • 尝试重新安装.NET框架

  • 删除临时文件asp.net

  • Cleaned the project
  • Deleted the pdb
  • Checked the configuration and ensured that it is debug
  • Set the debug configuration from "x86" to "Any CPU"
  • Tried creating project from scratch
  • Tried re-installing .net framework
  • Removed temporary asp.net files

然而,没有它们似乎是工作。我能之前,由于某种原因与断点调试我的项目中,发生了一件事,我不能够调试项目的任何more.Can有人请建议我我应该在什么弥补或修复来解决这个问题。

However, none of them seems to be working. I was able to debug my projects with breakpoint before and for some reason, something happened and I am not able to debug the projects any more.Can someone please suggest me what should I look up for or fix to resolve this issue.

推荐答案

也许你的断点是项目,它不依赖于启动项目。
隐这些项目不运行(键F5)编译

Probably your breakpoint is in project which is not dependent on "startup project". Implicitly these projects are not compiled on Run (button F5).

转到:工具 - >选项 - >项目和解决方案 - >生成和运行 - >取消选中第一个复选框(只有建立在运行启动项目和依赖

Go to: TOOLS -> Options -> Project and Solutions -> Build and Run -> uncheck first check box (Only build startup projects and dependencies on Run)

这篇关于Visual Studio的C#调试器 - 断点将目前尚未受到打击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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