问题描述
我有一个相对简单的C ++控制台项目,做一些计算和写一个输出文件。我试图确定为什么输出文件没有正确的输出。相反,我一直在努力与调试器。
I have a relatively simple C++ console project that does some calculations and writes an output file. I am trying to determine why the output file does not have the correct output. Instead, I have been struggling with the debugger.
由于某种原因,我无法在某个函数中的某一行之后添加一个断点 。
For some reason I cannot add a break point after a certain line in a certain function.
>
在1106行到1214行(函数结尾)之后的所有断点都不可达。
All breakpoints placed after line 1106 up to line 1214 (the end of the function) are not reachable.
EDIT:我已经移动了第一个图像中显示的特定代码在函数中,它打破没有问题,但现在我不能打破行1079和函数结束。我重命名了函数,但没有改变。
I have moved the specific code shown in the first image up in the function and it breaks no problem but now I cannot break between line 1079 and the function end. I renamed the function but that made no difference.
当我看到反汇编,我注意到一个奇怪的事情在第1078行:
When I look at the disassembly, I notice a strange thing at line 1078:
>
我不确定这是有区别,但1078之后的语句(行962)指的是一个名为CSVData的类型为字符串的对象。该字符串创建为空白,但在运行时用大量字符填充。我最初认为栈溢出(没有双关语),但是在CSVData对象被填充之前很久(10-15分钟)的应用程序启动时断点被禁用。
I'm not sure that this makes a difference but the statement after 1078 (line 962) refers to an object named CSVData of type string. The string is created blank but filled at run-time with a large number of characters. I was originally thinking stack overflow (no pun) but the breakpoint is disabled at application start which is long before (10-15 mins) before the CSVData object is populated.
第一个想法是:使用上一个断点。然而,当我走到下一行,它需要我到一段代码,我知道肯定是不执行(这是在另一个功能完全)。它继续在预定但不是源相关模式中跳跃。请帮帮我。我在这一个上失去了我的心!
The first thought would be: Use the previous breakpoint instead. However, when I step to the next line, it takes me to a section of code that I know for sure is not executing (It's in another function entirely). It continues jumping around in a predetermined but not source-relevant pattern. Please help me. I'm losing my mind on this one!
我在这里要求Google广泛地这么做。我已尝试以下操作:
I have Google'd this extensively before asking here. I have tried the following things:
- 删除所有文件
- 创建新的Win32控制台项目并添加只有
5个头和5个源文件。 - 重置Visual Studio设置
- 停用优化
- 取消选中要求源文件完全匹配原始版本
- 使用Debugconfig
- 使用记事本++验证EOL字符
- Deleting all files
- Creating new Win32 console project and adding onlythe 5 headers and 5 source files.
- Resetting Visual Studio settings
- Disable Optimization
- Un-check "Require source files to exactly match the original version"
- Use "Debug" config
- Use Notepad++ to verify EOL characters
我认为可能导致这个问题的是英特尔Parallel Studio Composer XE 2015 for Fortran,因为它为FPP项目添加了一个内联和优化选项。我已卸载并重新启动,试图从该安装中删除任何问题。
One issue that I thought may have caused this was Intel Parallel Studio Composer XE 2015 for Fortran because it added an inline and optimization option for FPP projects. I have uninstalled and restarted in an attempt to remove any issue from that installation.
我们欢迎任何建议。谢谢。
Any suggestions will be welcomed. Thanks.
推荐答案
我之前遇到过此问题。
尝试:
I have met this issue before.
try this:
这篇关于C ++ VS2013调试器断点:未命中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!