如何在调试java程序时在eclipse中执行某些函数?

时间:2022-12-28 20:47:14

Like firebug for debugging javascript,

就像firebug调试javascript一样,

is there such a feature in eclipse? or do I need a plugin?

eclipse中有这样的特性吗?还是我需要插件?

6 个解决方案

#1


54  

Use the Display view, or a bit quicker: highlight the code you want to run and right-click/Execute or Ctrl+U.

使用Display视图,或者更快一点:突出显示要运行的代码,右键单击/执行或Ctrl+U。

#2


27  

You can use the Display view to execute commands while debugging. You can find this in Window -> Show View -> Display

您可以使用Display视图在调试时执行命令。你可以在窗口->显示视图->显示中找到

#3


10  

Select the line and press ctrl+shift+D or ctrl+shift+I This will give the result in a popup.

选择线条并按ctrl+shift+D或ctrl+shift+I这将在弹出窗口中显示结果。

#4


5  

I believe that what you're looking for are "watch expressions". Just mark the piece of code in the source code view, right-click and select "Watch".

我相信你在寻找的是“观察表情”。只需在源代码视图中标记这段代码,右键单击并选择“Watch”。

#5


3  

you can use the 'Display' view to evaluate expressions in eclipse.

您可以使用“Display”视图来计算eclipse中的表达式。

Look under the debug list of views. It is a standard par part of the java tooling so you don't need a plugin

查看视图的调试列表。它是java工具的标准部分,因此不需要插件

#6


1  

You can also create a scrapbook page (a .jpage) file and type your code in there. Then click run. It looked slightly more convenient when I tried it.

您还可以创建一个剪贴簿页面(.jpage)文件,并在其中键入代码。然后单击运行。当我试的时候,它看起来稍微方便一点。

#1


54  

Use the Display view, or a bit quicker: highlight the code you want to run and right-click/Execute or Ctrl+U.

使用Display视图,或者更快一点:突出显示要运行的代码,右键单击/执行或Ctrl+U。

#2


27  

You can use the Display view to execute commands while debugging. You can find this in Window -> Show View -> Display

您可以使用Display视图在调试时执行命令。你可以在窗口->显示视图->显示中找到

#3


10  

Select the line and press ctrl+shift+D or ctrl+shift+I This will give the result in a popup.

选择线条并按ctrl+shift+D或ctrl+shift+I这将在弹出窗口中显示结果。

#4


5  

I believe that what you're looking for are "watch expressions". Just mark the piece of code in the source code view, right-click and select "Watch".

我相信你在寻找的是“观察表情”。只需在源代码视图中标记这段代码,右键单击并选择“Watch”。

#5


3  

you can use the 'Display' view to evaluate expressions in eclipse.

您可以使用“Display”视图来计算eclipse中的表达式。

Look under the debug list of views. It is a standard par part of the java tooling so you don't need a plugin

查看视图的调试列表。它是java工具的标准部分,因此不需要插件

#6


1  

You can also create a scrapbook page (a .jpage) file and type your code in there. Then click run. It looked slightly more convenient when I tried it.

您还可以创建一个剪贴簿页面(.jpage)文件,并在其中键入代码。然后单击运行。当我试的时候,它看起来稍微方便一点。