作为 Windows 服务安装时,启动带有远程调试 (jdwp) 的 Tomcat
我安装了 Tomcat 作为 Windows 服务。我想将其配置为支持通过 jdwp 进行远程调试。
从命令行 (catalina.bat) 启动它时,我可以添加此字符串以允许调试:
-agentlib:jdwp=transport=dt_socket,suspend=n,server=y,address=10000
Where can I linked jdwp support when running it as a windows service?出于这个问题的目的,我不想使用“Monitor Tomcat”应用程序,而是通过一些文件(如 server.xml、catalins.properties 等)配置它......
I have a Tomcat installed as a Windows service. I'd like to configure it to support remote debugging via jdwp.
When starting it from the command line (catalina.bat), I can add this string to allow debugging:
-agentlib:jdwp=transport=dt_socket,suspend=n,server=y,address=10000
Where can I added jdwp support when running it as a windows service? For the purpose of this question, I do not want to use the "Monitor Tomcat" application, but rather configure it via some file like server.xml, catalins.properties, etc ...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
以调试模式启动 Tomcat Windows 服务的步骤:
1) 进入Tomcat bin文件夹下的目录
2) C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\bin
3)运行tomcat7w.exe
4) 在 Java/Java 选项下,在所有 -D 选项上方输入行
-Xdebug
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
确保以上两行位于单独的行中
Steps to start Tomcat windows service in Debug mode:
1) Go to Directory under Tomcat bin folder
2) C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\bin
3) Run tomcat7w.exe
4) Under Java/ Java Options, enter lines above all the -D options
-Xdebug
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
Make sure the above 2 lines are in separate lines
请参阅此操作方法并修改提供的服务.bat 包含以下行:
这是 JVM_OPTIONS 的第一个设置。确保您不会覆盖已设置的选项。
像往常一样运行service.bat来安装调试服务
see this how-to and modify the provided service.bat to include the following line:
this is the first setting of the JVM_OPTIONS. make sure you dont overwrite options already set.
run the service.bat as usual to install the debug service