简体   繁体   English

要设置哪些 Java 命令行选项以允许远程调试 JVM?

[英]What are Java command line options to set to allow JVM to be remotely debugged?

I know there's some JAVA_OPTS to set to remotely debug a Java program.我知道有一些JAVA_OPTS可以设置为远程调试 Java 程序。

What are they and what do they mean ?它们是什么,它们是什么意思?

I know there's some JAVA_OPTS to set to remotely debug a Java program.我知道有一些JAVA_OPTS可以设置为远程调试Java程序。

What are they and what do they mean ?它们是什么,它们是什么意思?

I know there's some JAVA_OPTS to set to remotely debug a Java program.我知道有一些JAVA_OPTS可以设置为远程调试Java程序。

What are they and what do they mean ?它们是什么,它们是什么意思?

I know there's some JAVA_OPTS to set to remotely debug a Java program.我知道有一些JAVA_OPTS可以设置为远程调试Java程序。

What are they and what do they mean ?它们是什么,它们是什么意思?

I know there's some JAVA_OPTS to set to remotely debug a Java program.我知道有一些JAVA_OPTS可以设置为远程调试Java程序。

What are they and what do they mean ?它们是什么,它们是什么意思?

I know there's some JAVA_OPTS to set to remotely debug a Java program.我知道有一些JAVA_OPTS可以设置为远程调试Java程序。

What are they and what do they mean ?它们是什么,它们是什么意思?

I know there's some JAVA_OPTS to set to remotely debug a Java program.我知道有一些JAVA_OPTS可以设置为远程调试Java程序。

What are they and what do they mean ?它们是什么,它们是什么意思?

I know there's some JAVA_OPTS to set to remotely debug a Java program.我知道有一些JAVA_OPTS可以设置为远程调试Java程序。

What are they and what do they mean ?它们是什么,它们是什么意思?

I know there's some JAVA_OPTS to set to remotely debug a Java program.我知道有一些JAVA_OPTS可以设置为远程调试Java程序。

What are they and what do they mean ?它们是什么,它们是什么意思?

If you are using java 9 or higher, to remotely debug (which is also the case when you use docker at local) you have to provide --debug *:($port) .如果您使用的是 java 9 或更高版本,要远程调试(在本地使用 docker 时也是如此),您必须提供--debug *:($port) Because from java 9 --debug ($port) will only allow to debug at local, not remotely .因为从 java 9 --debug ($port)将只允许在本地调试,而不是远程调试。

So, you can provide command in docker-compose like command: -- /opt/jboss/wildfly/bin/standalone.sh --debug *:8787因此,您可以在command: -- /opt/jboss/wildfly/bin/standalone.sh --debug *:8787 -compose 中提供类似command: -- /opt/jboss/wildfly/bin/standalone.sh --debug *:8787

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM