tomcat jpda 远程调试

像一些主流的IDE都可以在本地用调试状态运行tomcat,但如何在本地调试其他电脑上的tomcat呢?tomcat可以通过jpda进行远程调试。
我在网上看到一些例子,都是讲怎样改startup.bat(linux下是startup.sh)或者是改catalia.bat( linux下是catalia.sh)。我觉得这样子太有侵入性了,怎样才能不改文件进行远程调试。我用的是tomcat 6.0.18。windows下可以通过命令"catalia.bat jpda start",用调试状态启动tomcat,linux则是"./catalia.sh jpda start"。我仔细看catalia.bat 和 catalia.sh的区别,bat 里面的默认jpda参数是
JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
command is executed. The default is "dt_shmem".

JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start"
command is executed. The default is "jdbconn".

JPDA_SUSPEND (Optional) Java runtime options used when the "jpda start"
command is executed. Specifies whether JVM should suspend
execution immediately after startup. Default is "n".
sh 里面默认jpda参数是
JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
command is executed. The default is "dt_socket".

JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start"
command is executed. The default is 8000.

JPDA_SUSPEND (Optional) Java runtime options used when the "jpda start"
command is executed. Specifies whether JVM should suspend
execution immediately after startup. Default is "n".

我测试一下,通过netbeans的调试连接器,远程调试linux下运行的tomcat。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值