2

Windows 上的 Clion 遇到了一个奇怪的问题

 2 years ago
source link: https://www.v2ex.com/t/812371
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

V2EX  ›  程序员

Windows 上的 Clion 遇到了一个奇怪的问题

  zeal7s · 20 小时 26 分钟前 · 814 次点击

使用的环境是 Windows 10 + Visual Studio 2019 Community + CLion 2021.2.3 就是很简单的一个 vector 逆序遍历,代码和单步调试时执行完毕 while 循环报错如下图所示

Capture1.PNG

另外补充四点:

  1. 正常执行时不会报错,只有单步调试时会报错
  2. 把该代码放到 Vistual Studio 中无论正常运行还是单步调试都不会报错
  3. 如果在 CLion 中把第 9 行i = *rIter注释掉,那么单步调式不会报错
  4. 如果把遍历改成正序遍历,CLion 单步调试也会出错

根据以上现象,感觉很有可能是 CLion 的问题。

以下是我的 CLion Toolchains 设置

Capture2.PNG

有在 Windows 上也用 CLion 的大佬可以帮我看看吗?


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK