Eclipse 无法设置断点

发布于 2024-07-15 22:14:15 字数 369 浏览 7 评论 0原文

遵循在 OSX 10.5.6 上使用 Eclipse 3.4.2 的 Android 记事本教程。

我被指示通过以下方式之一设置断点:

  1. 双击编辑器窗格左侧的灰色栏。

    • 这只会打开“添加书签”窗口
  2. 在上下文菜单中选择“切换断点”

    • 上下文菜单中的唯一选项是“转到注释...”(已禁用)、“添加书签”、“添加任务”、“快速比较”、“显示行号”、“折叠”和“偏好设置”

我的猜测是编辑器处于某种不允许设置断点的模式,但我只是一个 Eclipse 新手。 有人可以在这里提供任何建议吗?

Following the Android notepad tutorials using Eclipse 3.4.2 on OSX 10.5.6.

I'm instructed to set a breakpoint in one of the following ways:

  1. Double click on the gray bar to the left of the editor pane.

    • this just brings up the "Add Bookmark" window
  2. Select "Toggle breakpoint" in the context menu

    • the only options in the context menu are "Go to Annotation..." (which is disabled), "Add Bookmark", "Add Task", "Quick Diff", "Show line numbers", "Folding" and "Preferences"

My guess would be that the editor's in some mode that doesn't allow breakpoints to be set, but I'm only an Eclipse newb. Anyone able to lend any advice here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

乖乖 2024-07-22 22:14:15

当您双击灰色条时,会出现一个蓝色的球吗? 如果出现,请尝试将鼠标悬停在其上,它可能会显示“行断点:Blablabla”

否则,请尝试检查您是否使用 java 编辑器打开文件。 要检查此选项,请右键单击要打开的文件,转到打开方式条目并检查是否选择了 Java 编辑器,如果没有此选项,则意味着您尚未安装 JDT,最好下载 Java 版本eclipse 的官方网站。

如果前面的选项都没有帮助,它可能是一个错误,您应该将其报告给 eclipse bug 系统如果你能这么友善就好了。

When you double click the gray bar a blue ball appears? If it appears, try to hover you mouse over it and It may say "Line Breakpoint:Blablabla"

Otherwise, try to check if you are using a java editor to open your file. To check this right click the file you want to open, go to the Open With entry and check if Java Editor is selected, if there is not such option this means that you have not the JDT installed and is probably better to download the Java version of eclipse from its official website.

If none of the previous options helped, its probably a bug and you should report it to the eclipse bug system if you would be so kind.

策马西风 2024-07-22 22:14:15
  1. 右键单击文件(即 example.js)
  2. 转到“打开”,
  3. 单击“其他”,
  4. 单击“内部编辑器”单选按钮
  5. 从列表中选择 Java 编辑器

现在,您可以通过右键单击并从可用方法中选择一个来设置断点,即切换断点/行/方法等

  1. Right click on file(i.e. example.js)
  2. go to Open With
  3. click on Other
  4. click on Internal Editors radio button
  5. Select Java Editor from list

Now you can set the break point by right click and selecting one from available methods i.e. toggle breakpoint / line/method etc.

陌路黄昏 2024-07-22 22:14:15

我有完全相同的错误。 我重新启动了eclipse,但是没有用。 然后我关闭了所有文件,并重新打开感兴趣的文件,但它不起作用。 最后,我进入“调试”视角,并尝试设置断点,最后它对我有用。

I had the exact same error. I re-started eclipse, but it didn't work. Then I closed all files, and re-opened the file of interest, yet it didn't work. Finally, I went into the Debug perspective, and tried setting the Break-point, and finally it worked for me.

注定孤独终老 2024-07-22 22:14:15

我所有的断点都有一条对角线穿过它。 我遇到了这个问题,但原因是前一天我在调试视图中单击了“跳过所有断点”。 您必须取消选中此选项。 您可以在“运行”菜单中访问它。

也许这个答案对某人有用。

All my breakpoints had a diagonal line crossing it. I had this problem, but the reason was that one day before I've clicked in the "Skip all breakpoints" in the debug view. You must uncheck this option. You can access it in the "Run" menu.

Maybe this answer will be useful for someone.

旧时浪漫 2024-07-22 22:14:15

当您尝试将调试点放置在 .jsp 文件中时,也会发生这种情况。 Eclipse 不允许您调试 .jsp 文件,这就是您收到添加书签弹出窗口的原因。

请检查您正在处理的文件类型并相应地放置断点。

This also happens when you try to place debug points in .jsp files. Eclipse won't allow you to debug .jsp files and that is why you are getting that add bookmark pop-up.

Please check the type of file you are working on and place the breakpoints accordingly.

舂唻埖巳落 2024-07-22 22:14:15

我在 Eclipse 中遇到问题,无法使用快捷键或“运行 → 切换断点”选项在 Java 文件中放置断点,但我可以通过双击灰色边距来放置断点。 问题是我处于“JavaScript”的角度。 解决方案是更改为“Java 视角”。

I had the problem in Eclipse where I could not place breakpoints in Java files using the shortcut key or the Run → Toggle Breakpoint option, but I could place breakpoints by doubling clicking the gray margin. The problem was that I was in a 'JavaScript' perspective. The solution was to change to 'Java perspective'.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文