Debugging Windchill servers with Netbeans

本文介绍如何配置NetBeans调试器以调试运行在Windchill MethodServer上的代码。通过设置特定的Java参数,可以指定调试端口并控制是否在启动时暂停等待调试器连接。此外,还介绍了如何在Tomcat环境中启用调试。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Debugging
How to use Netbeans debugger when your code is running in the Windchill® Method Server?

In order to specify that a debugger can be attached to the process, we need to add the following option to the Method Server Java command :

-Xrunjdwp:transport=dt_socket,server=y,address=Port,suspend=y or n

For this How To, let’s choose the port 8000, and let’s say that the MethodServer should not wait for debugger attachement (suspend=n), the option will looks like this :

-Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n

Start a Windchill® shell and execute :

xconfmanager -s wt.manager.cmd.MethodServer.debug.args=
-Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n -p
 

Start Apache/Tomcat/Method server, under Netbeans you can now attach the debugger to the method server by selecting “Attach Debugger…” under the “Debug” menu (using the parameters specified in the property file) :

Windchill Method Server Netbeans debug

You may also debug in Tomcat, on 9.1, by updating the batch file that starts tomcat (Note that Tomcat is embedded from release 10)

w:/ptc/Tomcat/bin/wttomcat_start.bat
 

And add the following line.

rem Add debugging
set JAVA_OPTS=%JAVA_OPTS% 

-Xrunjdwp:transport=dt_socket,server=y,address=8001,suspend=n
 
Note the different port number to allow use to debug in the MS and the Tomcat in the same session
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值