eclipse 如何删除“调试当前指令指针”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18607193/
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 21:52:35  来源:igfitidea点击:

How to remove "Debug Current Instruction Pointer"

eclipse

提问by Sam

I tried to use the debugger in Eclipse, but when I hit my breakpoints, the Eclipse "Debug Current Instruction Pointer" is often pointing at the wrong source line.I really want to remove "Debug Current Instruction Pointer". "Project -> Clean..." doesn't seem to help, nor does restarting Eclipse, nor does rebooting.

我尝试在 Eclipse 中使用调试器,但是当我遇到断点时,Eclipse“调试当前指令指针”经常指向错误的源代码行。我真的很想删除“调试当前指令指针”。“项目 -> 清理...”似乎没有帮助,重新启动 Eclipse 也没有帮助,重新启动也没有帮助。

回答by Hassnain Jamil

The "Debug Current Instruction Pointer" is the position where you paused debugging last time. You can simply resolve it by following the below two steps

“调试当前指令指针”是您上次暂停调试的位置。您可以按照以下两个步骤简单地解决它

  1. Go to the "Debug" preference/panel
  2. Then click on the red square button to terminate the debugging you were executing last time or press Ctrl+F2(Windows) enter image description here
  1. 转到“调试”首选项/面板
  2. 然后单击红色方形按钮终止上次执行的调试或按Ctrl+F2(Windows) 在此处输入图片说明

Now, just debugthe program again. The execution will be starting from the "Toggle Breakpoint".

现在,只需再次调试程序。执行将从“切换断点”开始。

Note:You can delete the Toggle Breakpoint by double click on the line number and redefine the new according to your requirements by right click on targeted line number and select "Toggle BreakPoint" or press Ctrl+Shift+B(Windows)

注意:您可以通过双击行号删除 Toggle Breakpoint 并根据您的要求通过右键单击目标行号并选择“Toggle BreakPoint”或按Ctrl+Shift+B(Windows)重新定义新的断点

回答by Mohsin

Go to the debug view (as your current debug session is running) and complete or terminate current debugging session. this way you will get rid of "Debug Current Instruction Pointer"

转到调试视图(当您当前的调试会话正在运行时)并完成或终止当前的调试会话。这样你就可以摆脱“调试当前指令指针”

回答by Kristine

What helped me was remove all breakpoints - right-click, RemoveAll.

帮助我的是删除所有断点 - 右键单击​​,RemoveAll。

回答by mahesh kurmi

sometimes breakpoints remain in eclipse list even after we remove them by clicking over them, to remove

有时断点仍然保留在 Eclipse 列表中,即使我们通过单击它们来删除它们,以删除它们

  1. Show Breakpoints view by navigating menu
  1. 通过导航菜单显示断点视图

Window>>Show View>>Other>> Select Debug>>Breakpoints

窗口>>显示视图>>其他>>选择调试>>断点

  1. In Breakpoints view, uncheck unnecessary breakpoints
  1. 在断点视图中,取消选中不必要的断点

回答by palencar

Check the arguments written in Run Configuration, because they can be wrong. To reach Run Configuration, right click the project's main class -> Run As -> Run Configurations -> Java Application on menu -> Arguments. In the text Area write your arguments and try to debug again.

检查运行配置中写入的参数,因为它们可能是错误的。要访问运行配置,请右键单击项目的主类 -> 运行方式 -> 运行配置 -> 菜单上的 Java 应用程序 -> 参数。在文本区域中写下您的参数并再次尝试调试。

回答by Aya

To prevent this pointer from ever being displayed in the first place, go to

要防止此指针首先显示,请转到

Preferences -> General -> Editors -> Text Editors -> Annotations -> select Debug Current Instruction Pointer -> uncheck "Vertical ruler" box

首选项 -> 常规 -> 编辑器 -> 文本编辑器 -> 注释 -> 选择调试当前指令指针 -> 取消选中“垂直标尺”框

回答by indieNik

You need to get out of the current debug session. Go to the debug console and end the current session by hitting the red square button. This should remove all the debug current instruction pointers.

您需要退出当前的调试会话。转到调试控制台并通过点击红色方形按钮结束当前会话。这应该删除所有调试当前指令指针。

回答by piet.t

"Debug Current Insturction Pointer" isn't something you would want to remove since it is not something that is set in any way, ist just a pointer to the current instruction where the debugger has paused your application. You can see that easily if you just step through your application and see how the "Debug Current Insturction Pointer" is moving along.

“调试当前指令指针”不是您想要删除的东西,因为它不是以任何方式设置的东西,它只是一个指向调试器暂停应用程序的当前指令的指针。如果您只是单步执行应用程序并查看“调试当前指令指针”是如何移动的,您就可以很容易地看到这一点。

If you think it is pointing at the wrong source-line there are two reasons I can think of right now:

如果您认为它指向错误的源代码行,那么我现在可以想到两个原因:

  1. There are some "old" breakpoints left from earlier debug-sessions. You should see the breakpoint-marker and be able to remove it. If you want to get rid of all existing breakpoints just go to the breakpoints-view and remove them all using the double-X-icon.
  2. The source-file shown in the debug-window doesn't match the class file that is currently running. This is most likely to happen in some imported libraries and not in your own project's code, but if it still does happen a clean/rebuild should take care of the problem.
  1. 早期的调试会话留下了一些“旧”断点。您应该会看到断点标记并能够将其删除。如果您想删除所有现有的断点,只需转到断点视图并使用双 X 图标将它们全部删除。
  2. 调试窗口中显示的源文件与当前运行的类文件不匹配。这很可能发生在一些导入的库中,而不是您自己项目的代码中,但如果它仍然发生,清理/重建应该解决这个问题。