简体   繁体   中英

IntelliJ - Debugging process started by new process

I have a given jar file. It should be run with an argument which starts up another java process (my program).

I use a process builder to start a process (givenJar). Within this process, my program is started.

MyMain1: run processBuilder -> "java","-jar","givenJar.jar","java -cp myPath MyMain2"}

My problem is : How do I attach debugging? Is it possible?

I hope, that it makes sense... ;-)

Oh ok....

I solved it:

  1. Edit configurations
  2. Choose MyMain2
  3. In "Defaults" go to "Remote"
  4. Copy command line
  5. Go back to Application/Main2
  6. Insert command line in "Program arguments"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM