I am using JBoss with IntelliJ. I am running Jboss outside intellij. i.e running in Command Prompt. If that is the case, Can I debug my code in IntelliJ
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can debug any running JVM, even remote on a different computer via JDWP. First you need to prepare JBoss (same thing applies to any JVM) to listen for debugger connections on a given TCP/IP port:
-Xdebug -Xrunjdwp:server=y, transport=dt_socket,address=5005, suspend=n
This set of parameters has to be added to Java options, look for JAVA_OPTS
variable in your JBoss startup scripts. Once this is done, JBoss will listen on 5005 port for debugger connection. The very first line in JBoss console after starting it up should be:
Listening for transport dt_socket at address: 5005
Now you can attach your IntelliJ by choosing:
- Run
- Edit configurations
- "+" (Add)
- Remote
localhost
/5005
are fine
标签:
intellij-idea