Windchill 配置远程调用UAT环境代码栗子
修改wt.manager.cmd.MethodServer.debug.args配置
两种方式,一种是通过官方推荐的手法用命令添加,一种是简单粗暴的直接在wt.properties中增加
方式一:在windchill shell 中执行如下命令
xconfmanager -s wt.manager.cmd.MethodServer.debug.args="-Xdebug -Xrunjdwp:transport:dt_socket,server=y,suspend=n,address=9999" -t wt.properties -p
方式二:
#add by wonly.wu just config the remote test 0n 2019-08-30 begin
wt.manager.cmd.MethodServer.debug.args=-Xdebug -Xrunjdwp\:transport\:dt_socket,server\=y,suspend\=n,address\=9999
#add by wonly.wu just config the remote test 0n 2019-08-30 end
注意事项
wt.manager.cmd.MethodServer.debug.args 的适用场景
- wt.manager.cmd.MethodServer.debug.args ,只适用于只有一个方法服务器没有后台方法服务器的测试环境
- 如何需要配置多个方法服务器和一个后台方法服务器, 需要把参数 wt.manager.cmd.MethodServer.debug.args 设置为空;
- 当然了,如果有需要,也可以允许一个方法服务器和一个后台方法服务器的配置同时绑定不同的端口以便第三方远程Java调试器连接 ;
- 本地不需要安装windchill也可以远程调试,只需要有wt.properties配置即可
- 远程调试可以写mian方法待用,也可通过直接断点到方法,eclipse开启调试,就可以断点调试
我贴一下同时存在一个MethodServer和BackgroundServer的配置
wt.manager.cmd.MethodServer.debug.args={15}
wt.manager.cmd.MethodServer.param.15=-agentlib\:jdwp\=transport\=dt_socket,address\=9999,server\=y,suspend\=n
wt.manager.cmd.BackgroundMethodServer.param.15=-agentlib\:jdwp\=transport\=dt_socket,address\=9998,server\=y,suspend\=n
本地的配置做同步的修改:
搜索 Key:java.rmi.server.hostname 将等号后面的内容替换为你远程调用的服务器名称,
如:java.rmi.server.hostname=plmtest-master.tclcom.com
端口同步修改:
搜索Key:wt.manager.cmd.MethodServer.debug.args 将等号后面的内容替换为调用服务器的端口
如:wt.manager.cmd.MethodServer.debug.args=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999
好了,在eclipse中调用测试一下,发现调通了:
最后要感谢小笼包的指点迷津,嘿嘿,帮助我解决了执行命令报错的问题