I have a set of working pages and want to inspect variables at a breakpoint 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?
From the JSP file's context menu in the Project Explorer view, click Debug As> Debug on Server. The workbench switches to the Debug perspective and the server is launched in debug mode. In the Debug view, step through the code and make the necessary changes to the JSP file.
They appear to be coming from the included file. A JSP page executes in a context where quite a few variables are providedu: the request, the URL, the session, ...
If you have WTP installed, you can set breakpoints within a JSP and they work fine in a regular "remote debug" session. However, once you've stopped on a breakpoint, stepping through the code is nigh on impossible and finding whatever it is that you wish to inspect takes a lot of digging around in the "Variables" view.
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.
Hope it helps!
Struggled with the same problem and then looked at the variables View(Window) in Eclipse. All variables are there with their names and values.
But watch/inspect entries are indeed missing in right click menu.
BTW, I'm using Eclipse Kepler.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With