I want to be able to debug production systems with jdwp.
for this I want to add -Xdebug -Xrunjdwp:transport=dt_socket,address=11122,server=y,suspend=n
to each java process I am starting.
Is there any overhead for that in case the port is not activated?
is my JVM going to run slower in this case?
Enable JVM DebuggingClick Java > JVM Settings tab. Under Debug Java Settings, select the Enable Debug checkbox. Provide JVM options as necessary by clicking the New button. If you substitute suspend=y, the JVM starts in suspended mode and stays suspended until a debugger attaches to it.
Since in the JVM architecture, the debugging functionality is not found within the JVM itself but is abstracted away into external tools (that are aptly referred to as debuggers), these tools can either reside on the local machine running the JVM being debugged or be run from am external machine.
Click on + sign and select Remote. Give any name for your remote-debugging configuration. For say, my-debug. Give Host name and port of the server machine where application is running which you want to debug.
AFAIK, the answer is yes.
-Xdebug
turns off some runtime optimizations, etc.
In addition, the fact that it's possible to connect to the JVM via jwdp, isn't secure very much. I don't think any production environment should allow this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With