Skip to main content

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

This is the actual line I type to launch HelloWorld so that I can remote debug it:

c:\jdk1.3.1_01\bin\java -cp "." -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 HelloWorld

Note that you can change "suspend=y" to "suspend=n" if the program to debug is more like a server.

Darins
>@
>12/14/2001 10:59 AM EST
>Please respond to jdt-debug-dev
>
> To: jdt-debug-dev@xxxxxxxxxxx
> cc:
> bcc:
> Subject: [jdt-debug-dev] Re: Debugging multiple processes?
>
>
>

>So I'm trying number (1), but obviously I'm still not doing something
>right.  I noticed JDK12DebugLauncher uses javaw instead of java, is this
>important?  When you said "server=y", should I interpret that literally, or
>is "y" a variable to be replaced with "localhost" or an IP?  Is -Xdebug
>required?  I've tried many permutations, including:
>

>java server=y address=8000 org.my.package.MyApplication
>java -Xdebug -Dserver=y -Daddress=8000 org.my.package.MyApplication
>java -Xdebug -Xrunjdwp:transport=dt_socket,address=127.0.0.1:8000
>org.my.package.MyApplication
>...etc...
>

>Sorry, I'm not very experienced in this area.  Could someone give an exact
>java command line that launches a VM that I can debug from Eclipse?  I
>think option (2) is not what I want, because my app is NOT a plug-in... I
>don't want to copy wads of debug plug-in code just to launch a VM.
>

>-----------------------
>

>Darin said:
>

>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
>

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


Back to the top