netbeans 是否有类似 Eclipse Debug 显示视图的东西

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

does netbeans have something like Eclipse Debug display view

javaeclipsedebuggingnetbeans

提问by Sam Joseph

does netbeans have something like Eclipse Debug display view?

netbeans 是否有类似 Eclipse Debug 显示视图的东西?

I love the interactive window for trying out Java code in Eclipse debug mode, and it's mentioned in this post:

我喜欢在 Eclipse 调试模式下试用 Java 代码的交互式窗口,这篇文章中提到了它:

Is there any Python-like interactive console for Java?

有没有类似 Python 的 Java 交互式控制台?

Just wondering if I can get the same in netbeans

只是想知道我是否可以在 netbeans 中得到相同的结果

回答by manavi

There is a menu option: Debug - Evaluate Expression...

有一个菜单选项:调试 - 评估表达式...

And also a shortcut: Ctrl+F9(in Windows)

还有一个快捷方式:Ctrl+ F9(在 Windows 中)

You can see an explanation at How to Evaluate Code

您可以在如何评估代码中看到解释

回答by Freudian Slip

There isn't an interactive window for debugging quite like Eclipse, although you can set up breakpoints in the program while debugging to follow the step by step route in which the program executes. Have you looked at the NetBeans site? http://netbeans.org/features/java/debugger.html

没有像 Eclipse 那样的用于调试的交互式窗口,尽管您可以在调试时在程序中设置断点以遵循程序执行的逐步路线。您是否查看过 NetBeans 站点?http://netbeans.org/features/java/debugger.html

回答by eclipseUser

While debugging, press ctrl+shift+I to evaluate an expression. In the "Evaluate Expression" window you can do the same as in eclipse's display window.

调试时,按 ctrl+shift+I 计算表达式。在“评估表达式”窗口中,您可以执行与 eclipse 显示窗口中相同的操作。