Ashika Umanga Umagiliya
Ashika Umanga Umagiliya

Reputation: 9158

Glassfish 3.1 remote debugging with Eclipse

I have deployed my WAR on a remote Glassfish server(not the same machine Eclipse runs) and wanted to do remote debugging using Eclipse.

Here are the steps I followed :

1) Enabled debugging in Glassfish ( start-domain --user admin --debug shopserver-grp01 ) Enabled Debug in JVM settings in the server instance.

2) In Eclipse started Debug "Remote Java Application" and successfully connected to the jdb port of the Glassfish server.

3) Changed the perspective to "Debug" and I could see the connection is successful and running server threads.

4) Toggled some breakpoints in my Service classes.

5) Open the browser and accessed my REST service with some parameters.

But the Eclipse wont pause at the marked Break points?

Any tips ? Any special compiler parameters when building ? I use Maven.

Upvotes: 0

Views: 2457

Answers (2)

Markus Lausberg
Markus Lausberg

Reputation: 12257

You can not debug Java classes which were compiled without debug informations. If the class does not contain this information, you are not able to debug the class at runtime. this is a special compiler option for reducing the class size and for preventing debugging.

Can you please check, whether the glassfish contains this information.

Determine whether .class file was compiled with debug info?

Upvotes: 2

Rein
Rein

Reputation: 478

Could you try another Java IDE or debugger to eliminate the possibility of the Eclipse debugger being bugged?

Upvotes: 1

Related Questions