0

I would like to debug an external launched jar application inside my Eclipse.

The way I'm launching the jar file is:

java -jar "D:\tools\swagger-codegen-cli.jar" generate -i http://guest1:8080/dbox/cmng/swagger.json -l typescript-angular2 -v

This jar file is generated using mvn package and copied in D:\tools\.

I've cloned git repository and I've imported the maven project inside Eclipse.

Is there any ideas?

Jordi
  • 20,868
  • 39
  • 149
  • 333

1 Answers1

1

Run your jar with

java 
  -Xdebug 
  -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8888
  -jar myjar.jar

In Eclipse you have to make a debug configuration. For a remote java appilcation. With 8888 as the port.

Jordi
  • 20,868
  • 39
  • 149
  • 333
tomas
  • 830
  • 3
  • 8
  • 25
  • That would mean this question was a duplicate of https://stackoverflow.com/questions/138511/what-are-java-command-line-options-to-set-to-allow-jvm-to-be-remotely-debugged – Raedwald Aug 24 '17 at 08:22
  • you are right, except the hint to the eclipse launch configuration – tomas Aug 24 '17 at 08:26