users@glassfish.java.net

RE: Re: RE: Re: Debugging Client Container

From: Markus Karg <karg_at_quipsy.de>
Date: Mon, 23 Jun 2008 19:13:34 +0200

Tim,

thanks a lot for posting that idea. But as I posted already, I already do know how to use JDWP to do remote debugging of my *deployed* application inside of ACC. But that is not what I want to do. I want to debug "in process", not "remotely". Why? Because the "change-debug-fix cycle" is far too slow with remote debugging: After each change I have to build the complete EAR, deploy it, start the ACC, start the debugger... What I want to do is: Change the source, start the debugger, that's it -- no build, no deploy. Just as we all are used to do it with a standalone program. I think that is easy to do as soon as someone would post a list of all the JARs and command line options needed to make ACC run inside of Eclipse (and accept a directory with class files instead of a Client JAR file). But I didn't find such a list, and reengineering appclient.bat... well... I gave up after half an hour due to its complexity and dependencies.

Thanks
Markus

-----Original Message-----
From: glassfish_at_javadesktop.org [mailto:glassfish_at_javadesktop.org]
Sent: Montag, 23. Juni 2008 16:47
To: users_at_glassfish.dev.java.net
Subject: Re: RE: Re: Debugging Client Container

Hi, Markus.

Would this work for you:

1. Set the environment variable VMARGS to -agentlib:jdwp=transport=dt_socket,address=8118,server=y,suspend=y

2. Start your app client normally using the appclient script. (The VMARGS env. variable is detected automatically and added to the java comand line used to start the ACC.)

3. Using your favorite debugger, connect to that host, port 8118.

By setting "suspend=y" the ACC's vm waits until a debugger connects before starting, so you can set breakpoints, etc. in the debugger before connecting to the ACC's vm and interrupt your client's execution wherever you want.

- Tim
[Message sent by forum member 'tjquinn' (tjquinn)]

http://forums.java.net/jive/thread.jspa?messageID=281997

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
For additional commands, e-mail: users-help_at_glassfish.dev.java.net