1

I am remote debugging a java application in Eclipse. I start the remote application with following command;

java -Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=y -jar MyApp.jar 

And manage to succesfully connect to it in Eclipse on the port 8001. I can debug it fine and my breakpoints will catch. But I can not inspect variable values in Eclipse while debugging, only method params are showing in the variables tab. When debugging local Java apps i can inspect all the variable values just fine, so I think my IDE setup is ruled out?

In my build.xml i have tried to enable debugging with

 <javac srcdir="@{srcdir}/java"
               includes="**"
               includeantruntime="false"
               encoding="utf-8"
               destdir="@{destdir}"
               source="1.6"
               target="1.6"
               debug="true"
               debuglevel="lines,vars,source">
            <classpath refid="@{classpathref}"/>
        </javac>

What am I missing here? Any pointers highly appreciated.

2 Answers 2

1

Turns out my (ant) build.xml was set up correctly. Simply needed a recompile of the project. The variables are showing in the variables tab now.

Sign up to request clarification or add additional context in comments.

Comments

0

Variables can be renamed in your .class file so you cannot inspect them by their name on .java.

You can use the Variables view (Window -> show view -> Variables (under Debug folder)) to inspect the value of all fields and local variables available to the current scope.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.