Eclipse 的即时窗口

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

Immediate Window for Eclipse

visual-studioeclipseimmediate-window

提问by Justin R.

Does Eclipse have an analog to Visual Studio's "Immediate Window", a window where I can evaluate statements while in the debugger?

Eclipse 是否与 Visual Studio 的“立即窗口”类似,我可以在该窗口中在调试器中评估语句?

采纳答案by AdamC

Eclipse has a really cool concept call Scrapbook Pageswhere you can evaluate statements even when you're not debugging. However, if you want to eval code using values from the current program, go to Window->Show View->Expressions. There you can put in any expression you want and track it as your program executes.

Eclipse 有一个非常酷的概念叫做Scrapbook Pages,即使您不进行调试,您也可以在其中评估语句。但是,如果您想使用当前程序中的值来评估代码,请转到 Window->Show View->Expressions。在那里您可以输入您想要的任何表达式并在程序执行时对其进行跟踪。

回答by Todd

Yes. The view name is "Display".

是的。视图名称是“显示”。

Window->Show View->Other It is under the Debug folder.

Window->Show View->Other 在Debug文件夹下。

Once in there you evaluate statements while in the debugger.

一旦进入那里,您就可以在调试器中评估语句。

回答by Trevor Harrison

Inspect ctrl-shift-i or Display ctrl-shift-d?

检查 ctrl-shift-i 或 Display ctrl-shift-d?