Eclipse 不会在断点处停止

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4388192/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 19:47:55  来源:igfitidea点击:

Eclipse doesn't stop at breakpoints

eclipsedebugging

提问by Ayrad

Eclipse 3.5.2 is not stopping in breakpoints. It's as if the debugger is using an older version of the source file.

Eclipse 3.5.2 不会在断点处停止。就好像调试器正在使用旧版本的源文件一样。

Tried the usual refresh, clean all projects, build all, with no change.

尝试了通常的刷新,清理所有项目,构建所有,没有任何变化。

Already in debug mode and the break point is checked.

已处于调试模式并检查断点。

*ok ended up deleting the whole project and checking it out again. but still curious what the issue was.

*ok 最终删除了整个项目并再次检查。但仍然好奇问题是什么。

回答by Fabian Steeg

Perhaps you have pushed the Skip all Breakpointsbutton in the Breakpointsview.

也许您在Breakpoints视图中按下了Skip all Breakpoints按钮。

回答by Kareem

Thanks guys, this really saved my day too. I antecedently pressed on skip break points, if you did the same this will result on break point appearing with a backslash icon on them.

谢谢你们,这也真的拯救了我的一天。我之前按下了跳过断点,如果你这样做了,这将导致断点上出现一个反斜杠图标。

To bring it back to normal:

要使其恢复正常:

  1. Switch to Debug perspective.
  2. press on the breakpoints view tap -->> upper right hand corner of the screen, you also can go there by Window->show view-> breakpoints.
  3. 5th icon from the left you will see break point with backslash. press on that one.
  1. 切换到调试透视图。
  2. 按断点视图点击-->>屏幕右上角,您也可以通过窗口->显示视图->断点去那里。
  3. 左起第 5 个图标,您将看到带反斜杠的断点。按那个。

To confirm, try putting break point on any line, and it should appear normally.

要确认,请尝试在任何行上放置断点,它应该会正常显示。

回答by ChandraBhan Singh

Press Ctrl + Alt + B

Ctrl + Alt + B

OR go through below steps

或通过以下步骤

enter image description here

在此处输入图片说明

回答by Hyman

Sometimes you do start the debug mode but the debugger doesn't actually get attached/gets detached. I've also had this issue a few times when my laptop was reacting really slowly. A reboot always solved it for me.

有时您确实启动了调试模式,但调试器实际上并未连接/分离。当我的笔记本电脑反应非常缓慢时,我也遇到过几次这个问题。重新启动总是为我解决它。

Also try doing a clean all (works miracles in Eclipse).

也尝试做一个干净的所有(在 Eclipse 中创造奇迹)。

回答by Richard

Clearing all Breakpoints fixed the issue (within debugger perspective: Window -> Remove All Breakpoints).

清除所有断点修复了问题(在调试器的角度:)Window -> Remove All Breakpoints

Remove All BreakPoints

Remove All BreakPoints

Rebuilding the project did not work for me.

重建项目对我不起作用。

回答by kanaparthikiran

Please un check this from the Eclipse Menu.

请从 Eclipse 菜单中取消选中此项。

Run->Skip all breakpoints.

运行->跳过所有断点。

I think this will be enabled permanently once You select the Remove all Break points option in the Debug/Breakpoints window.

我认为一旦您在调试/断点窗口中选择删除所有断点选项,这将永久启用。

回答by FlorianT

It has also happened to me, in my case it was due to the GDB launcher, which I needed to turn to "Legacy Create Process Launcher". To do so,

它也发生在我身上,在我的情况下是由于 GDB 启动器,我需要转向“Legacy Create Process Launcher”。为此,

  • either change the default launchers to the "Legacy Create Process Launcher", in Windows>Preferences>Run/Debug>Launching>Default Launchers.

  • or choose this launcher in the debug configuration of your application (Run>Debug configurations>choose your debug configuration). Under the "main" tab at the bottom, click on "Select other...", check the box "Use configuration specific settings" and choose "Legacy Create Process Launcher".

  • 或者在 Windows>Preferences>Run/Debug>Launching>Default Launchers 中将默认启动器更改为“Legacy Create Process Launcher”。

  • 或在应用程序的调试配置中选择此启动器(运行>调试配置>选择调试配置)。在底部的“main”选项卡下,单击“Select other...”,选中“Use configuration specific settings”框并选择“Legacy Create Process Launcher”。

回答by Arry

Performing a "Clean All" worked for me.

执行“全部清洁”对我有用。

Click on "Project" tab --> "Clean" menu-item.

单击“项目”选项卡 -->“清理”菜单项。

In the "Clean" dialogue-box select "Clean all projects" radio-button. Leave the remaining values as default. Click "OK" button.

在“清理”对话框中选择“清理所有项目”单选按钮。将其余值保留为默认值。单击“确定”按钮。

BINGO!!!The remote-debugging started working for me as beautiful as before.

宾果游戏!!!远程调试对我来说和以前一样漂亮。

回答by ankitkpd

I had a conditional break point wrongly put on the method entry point. Removed that breakpoint and it worked.

我在方法入口点上错误地设置了一个条件断点。删除了那个断点,它起作用了。

Note: Tried Skip all Breakpoints, Clean all projects, Refresh, close Eclipse with no luck before nailing it.

注意:尝试跳过所有断点,清理所有项目,刷新,在确定之前没有运气关闭 Eclipse。

回答by Tuomas

One reason for this situation can be, that you have pressed 'skip all breakpoints', when play- and another pictures are smaller than those normally are (because of higher resolution screen). Another thing can be, that break points are stopped only under VM threads, not under normal threads!

出现这种情况的一个原因可能是,您在播放时按下了“跳过所有断点”,而另一张图片比正常情况下要小(因为屏幕分辨率更高)。另一件事可能是,断点仅在 VM 线程下停止,而不在普通线程下!