Debugging local variables in JBoss/Tomcat using Eclipse

R

Ronald

Hi,

Currently I'm using Eclipse / Jboss / Tomcat to develop my Java web
applications. I'm using the JBoss plugin for eclipse. With this plugin
I manage quite nicely to debug my application, except for one thing.
I just can't get the debugger to let me inspect local variables in a
class method. Eclipse just gives me an evaluation error. It allows me
to inspect the globals the way I expect.
Has anyone experienced this problem before ? (and does anyone know how
to solve it? )

Cheers,

Xander
 
S

Sudsy

Ronald said:
Hi,

Currently I'm using Eclipse / Jboss / Tomcat to develop my Java web
applications. I'm using the JBoss plugin for eclipse. With this plugin
I manage quite nicely to debug my application, except for one thing.
I just can't get the debugger to let me inspect local variables in a
class method. Eclipse just gives me an evaluation error. It allows me
to inspect the globals the way I expect.

Based on what you've written you are trying to access either:
- class (static) method variables, or
- class (static) variables

For the first, when you "Step Into" the class method then the
variables should be displayed in the "Variables" window. For
the second case, right click on the upper pane of the "Expressions"
window and select "Add Java Watch Expression" from the pop-up
menu. Enter the expression in the form of ClassName.variableName.
For example, I've got a class called LoginAction (a Struts Action)
with a class variable called count. My expression becomes
LoginAction.count. The variable name MUST be qualified by the
class name.
BTW, These instructions work as advertised on Eclipse 2.1.2
running with JBoss 3.2.2.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,052
Latest member
LucyCarper

Latest Threads

Top