0

I want to debug a swing application remotely using JPDA, so that I can easily filter out the chunk of codes based on the user action rather than going through numerous methods and classes. After checking on several websites and three swing specific books, the most detail I could find is

Start your application, for example, by the following parameters, to debug them by means of the NetBeans IDE:

-Xdebug -Xrunjdwp: transport=dt_socket,server=y,address=65535,suspend=n

What I am wondering is where do I provide these parameters. Running the application through command line seems to be very cumbersome, as I am working on full fledged enterprise application with huge EJB and EAR. Also, it is a swing application and not a jar.

Earlier I had debugged a SOAP web service and a VB client by starting wildfly in debug mode by inserting jvm-options node in %JBOSS_HOME%/domain/configuration/domain.xml using this SO post

Debuggint the client this way made by work much easier. I want to apply the same to this swing based application. Do I put the above mentioned paramenters in jvm-options only ? If yes, how do I know the value of port ?

The application consist of numerous modules most of them having their own swing UI. So I think I cannot just run one swing ui through cli, passing these jvm parameters ?

sss
  • 598
  • 6
  • 24
  • Does all of your modules run with the same JVM or each one use a different JVM? – Luiggi Mendoza Jun 18 '18 at 22:17
  • @LuiggiMendoza: They all run on the same JVM. Also, I am running the application locally on a standalone wildfly server (not the embedded one in netbeans), if that helps – sss Jun 18 '18 at 22:34

1 Answers1

0

I found out in one of the books for Rich Client Platform development that each module of Netbeans is a jar by default. The first module of the application to run is login module. I was able to debug the entire application using below command

java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n -jar login.jar
sss
  • 598
  • 6
  • 24