如何修复 Eclipse Cdt 断点问题?

How to fix Eclipse Cdt breakpoint issue?

我的设置:

今天开始我的 eclipse,在 makefile 项目上进行调试会话 → Debug As → Local C/C++ Application(我过去做过数百次)。 正如预期的那样,调试器在 main() 处停止,调试器控制台视图显示:

GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Temporary breakpoint 1, main (argc=1, argv=0x7fffffffde68) at src/Main.cxx:169
169 {

我还可以单步执行和观察变量等,并且 Ctrl+R(运行 行)也可以工作。

但不知为何,我无法使用eclipse设置断点。

但是,我仍然能够使用 gdb 命令行设置断点(使用 eclipse 调试器控制台视图)。

请注意,设置断点直到几天前才有效,但我不知道我的设置中可能发生了什么变化。

有什么建议我的配置可能有什么问题以及如何解决这个问题吗?

可能性:

  1. 签入 Breakpoints 视图,即使那些在 gdb 中设置的断点也会自动显示在此视图中。
  2. 检查您使用的是哪个编辑器(是 C/C++ 编辑器)吗?
  3. 尝试使用快捷键 (Shift+Ctrl+B) 切换断点。默认情况下,快捷键未分配给所有与断点相关的命令。所以请检查首选项。

发现问题是在通过 Eclipse Marketplace 安装 Html Editor (Wtp) 后出现的。

安装Eclipse Web Developer Tools后问题已解决