eclipse 如何检查 JSP 页面上的变量

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

How to inspect a variable on a JSP page

javaeclipsejspvariablesinspect

提问by glez

I have a set of working pages and want to inspect variables at a break point on a JSP page. unfortunately the context menu for the variable doesn't show the normal Inspect/Watch options as it does when in a Java file. Any ideas?

我有一组工作页面,想在 JSP 页面的断点处检查变量。不幸的是,变量的上下文菜单没有像在 Java 文件中那样显示正常的 Inspect/Watch 选项。有任何想法吗?

回答by Martín C

Here is a solution worked for me:

这是一个对我有用的解决方案:

In Eclipse open the Display tab view (Window -> Show View -> Display) In the Display tab write the variable or expression you want to inspect. Select it and do a right click and you'll have the a menu with the option inspect (or you can do a Ctrl + Shift + I), it will show you the value of the variable.

在 Eclipse 中打开 Display 选项卡视图(Window -> Show View -> Display) 在 Display 选项卡中写入要检查的变量或表达式。选择它并右键单击,您将看到带有选项检查的菜单(或者您可以执行 Ctrl + Shift + I),它将显示变量的值。

Hope it helps!

希望能帮助到你!

回答by mp31415

Struggled with the same problem and then looked at the variables View(Window) in Eclipse. All variables are there with their names and values.

苦苦挣扎着同样的问题,然后在Eclipse中查看了变量View(Window)。所有变量都有它们的名称和值。

But watch/inspect entries are indeed missing in right click menu.

但是在右键菜单中确实缺少观察/检查条目。

BTW, I'm using Eclipse Kepler.

顺便说一句,我正在使用 Eclipse Kepler。