Visual c++ if语句.当前不会命中该断点
Visual C++ if statement. The breakpoint will not currently be hit
我使用Visual Studio 2013,用c++编程,并具有以下属性的基类:
ref class AI
{
...
protected:
/// <summary>
/// Exit found flag. False if exit is yet to be found, true if it already was.
/// </summary>
bool exitFound;
...
}
在派生类中我有以下代码:
void AI_II::analyze(void)
{
...
this->exitFound = true;
if (this->exitFound)
{
if (this->distFront->lastTile == EXIT){...}
else if (this->distDown->lastTile == EXIT){...}
else if (this->distBack->lastTile == EXIT){...}
else if (this->distUp->lastTile == EXIT){...}
}
...
}
我不知道为什么,但是在运行或调试时,if (this->exitFound)
语句总是被跳过。当调试时,我得到"断点当前不会被击中…"消息。
我已经尝试过清理解决方案,但到目前为止还没有成功。谁能帮我找出问题所在?
在Visual Studio中选择[Properties] - [Build]选项卡并勾选[Define DEBUG constant]和[Define TRACE constant]。在[高级]选项卡中检查[调试信息]设置为[full]
相关文章:
- 无法删除指针,已触发断点
- 条件断点在不应该触发时触发
- GDB 断点在 Mac 上是不准确的
- 在 vscode 中运行时无法暂停或设置断点
- 不会命中此断点
- 当前不会命中断点。没有调试器目标代码类型的可执行代码与此文件关联
- 如何在进入动态打开的共享库时设置断点?
- 为什么断点显示数组的第二个值是一个大数字?额外学分工作
- 代码在 msvcrt .dll函数上设置断点失败
- 如何在引用上设置数据断点
- 无法在visual studio 2017(本机c++)中禁用数据断点
- 为什么在c++中使用Delete[]会出现跟踪/断点错误
- for循环的条件只有在遇到断点后才生效
- 项目名称.exe 已触发断点
- 视觉对象触发了断点 c++
- 实现在多线程代码中安全恢复的断点
- 如何在 gdb 中的所有构造函数上同时为 C++ 对象设置断点?
- C/C++ 经过的流程周期,不包括断点处
- 在 Visual Studio 2012 中未命中断点
- 无法在 XmlHttpRequest 模块上获取断点(Javascript 引擎/XHR 请求)