如何在 Eclipse 中使用断点

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

How to use breakpoints in Eclipse

eclipsedebuggingbreakpoints

提问by Jisson

I am using the Eclipse IDE. I don't know how effectively put breakpointsin Eclipse and go forward and backward into it. Can anyone help me?

我正在使用 Eclipse IDE。我不知道如何有效地在 Eclipse 中放置断点并在其中前进和后退。谁能帮我?

Can anyone suggest a site suitable for me?

谁能推荐一个适合我的网站?

采纳答案by Raghuram

Googling gives many sites... Debugging with the Eclipse platformfor one.

谷歌搜索提供了许多站点...使用 Eclipse 平台调试其中之一。

回答by James

To put breakpoints in your code, double click in the left margin on the line you want execution to stop on. You may alternatively put your cursor in this line and then press Shift+Ctrl+B.

要在代码中放置断点,请双击您希望执行停止的行的左边距。您也可以将光标放在这一行,然后按Shift+ Ctrl+ B

To control execution use the Step Into, Step Overand Step Returnbuttons. They have the shortcuts F5, F6and F7respectively.

要控制执行,请使用Step IntoStep OverStep Return按钮。他们有快捷方式F5F6F7分别。

To allow execution to continue normally or until it hits the next breakpoint, hit the Resume button or F8.

要允许执行正常继续或直到遇到下一个断点,请点击“继续”按钮或F8

回答by S.Thiongane

Here is a video about Debugging with eclipse.

这是一个关于使用 eclipse 调试的视频。

For more details read this page.

有关更多详细信息,请阅读此页面

Instead of Debugging as Java program, use Debug as Android Application

使用Debug 作为 Android 应用程序,而不是作为 Java 程序调试

May help new comers.

可以帮助新人。

回答by Daniel Kmak

Put breakpoints - double click on the margin. Run > Debug > Yes (if dialog appears), then use commands from Run menu or shortcuts - F5, F6, F7, F8.

放置断点 - 双击边距。运行 > 调试 > 是(如果出现对话框),然后使用运行菜单中的命令或快捷方式 - F5、F6、F7、F8。

回答by Vishal Jain

Breakpoints are just used to check the execution of your code, wherever you will put breakpoints the execution will stop there, so you can just check that your project execution is going forward or not. To get more details follow link:-

断点仅用于检查代码的执行情况,无论您将断点放置在哪里,执行都会停止,因此您可以检查项目执行是否继续进行。要获得更多详细信息,请点击链接:-

http://javapapers.com/core-java/top-10-java-debugging-tips-with-eclipse/

http://javapapers.com/core-java/top-10-java-debugging-tips-with-eclipse/