Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-debug-dev] Debugging multiple processes?


Just launching VMs in debug mode is not enough...

There are two things you could do

(1) If you launch the VMs, such that they can accept connections, then you can use the "Remote Java Application" launcher to attach to the VMs after they are launched. To do this, the VM needs to be launched with "server=y" and "address=SOME_PORT" (i.e. 8000, or something). Then, from Eclipse, select the project you are debugging (such that source can be located), and from the "Debug" drop down menu on the tool bar, select "Debug -> Remote Java Application". Type in the port the VM is listening on, press finish, and you should have a debug session in Eclipse.

(2) The other thing to do, is to lanuch the VMs programatically. However, all the code to do this is not (yet) API. You could look at the "JDK12DebugLauncher" as an example.

Darin



John_Arthorne@xxxxxxx
Sent by: jdt-debug-dev-admin@xxxxxxxxxxx

12/12/2001 11:21 AM
Please respond to jdt-debug-dev

       
        To:        jdt-debug-dev@xxxxxxxxxxx
        cc:        
        Subject:        [jdt-debug-dev] Debugging multiple processes?


I have a java program (not a plugin) that launches several other VM
instances using the java process mechanism: Runtime.getRuntime().exec().
If I launch my program from Eclipse in debug mode, the debugger doesn't
automatically connect to the forked VMs.  Is there any way to get this to
happen?  This is just used for running test cases, so any hacked approach
would be acceptable... it doesn't have to be pretty.  Any suggestions on an
approach I can take for this would be appreciated!


_______________________________________________
jdt-debug-dev mailing list
jdt-debug-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/jdt-debug-dev



Back to the top