cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Configuring the Method Server JVM for Remote Debugging

Regular Member

Refer to PTC Document CS163539 for issues for remote debugging.


A. For single Method server and "NO" background method server on a development environment:

The process to enable JPDA debugging is the same regardless of the Java application being debugged.  The developer needs to specify a few arguments to the JVM when starting the application.  To enable JPDA debugging, add the following arguments to the wt.manager.cmd.MethodServer.debug.args line in the wt.properties file as shown below.


xconfmanager -s "wt.manager.cmd.MethodServer.debug.args=-Djava.compiler\=NONE -Xnoagent -Xdebug -Xrunjdwp:transport\=dt_socket,address\=9999,server\=y,suspend\=n" -t codebase/wt.properties -p


If a BGMS or more than one MS needs to be run, then the property wt.manager.cmd.MethodServer.debug.args should be undefined or set to an empty string

Common Practice

B. For single Method server and one background method server on a development environment:

It is possible to allow the MS and BGMS processes to run simultaneously while keeping the java debugger settings by setting the below properties:


wt.manager.cmd.MethodServer.debug.args={15}

wt.manager.cmd.MethodServer.param.15=-agentlib\:jdwp\=transport\=dt_socket,address\=9000,server\=y,suspend\=n

wt.manager.cmd.BackgroundMethodServer.param.15=-agentlib\:jdwp\=transport\=dt_socket,address\=9001,server\=y,suspend\=n


This will configure the MS process to listen on port 8000 and the BGMS on port 8001. However, this workaround still limits the system to a single MS and the BGMS


wt.properties.xconf settings:


<Property name="wt.manager.cmd.MethodServer.debug.args" default="{15}"/>

   <Property name="wt.manager.cmd.MethodServer.param.15" default="-agentlib\:jdwp\=transport\=dt_socket,address\=9000,server\=y,suspend\=n"/>

  <Property name="wt.manager.cmd.BackgroundMethodServer.param.15" default="-agentlib\:jdwp\=transport\=dt_socket,address\=9001,server\=y,suspend\=n"/>


Eclipse setup for debugging

An Eclipse project needs to include a Remote Java Application Debug configuration setup in order to debug remotely. The remote debug configuration will listen for an action invoke on the Windchill server through a port number, example port 9001.


2 Comments
Regular Member

There are tricks you can play with other {n} parameters to support debug connections against multiple foreground method servers as well.  [See wt.manager.BaseServerLauncher's Javadoc for parameters of interest.]

Participant

The description in part B is incorrect. It states that the MS and BGMS will run on 8000 and 8001 when in fact they will run on 9000 and 9001 respectively based on the ports specified in the command. Noted in the hope that it might avoid some possible confusion...