As known, after jdk 5, no need to specify -Xdebug
for debugging, instead, use -agentlib:jdwp
, but does it mean debug mode is gone? And does it mean the java program would run in normal mode without any performance trade-off, while you could still attach it anytime you want to debug it?
Compared to C/C++, you could debug the app compiled in optimized mode, as long as you do not strip debug symbols, although, in optimized mode the debugging is not so precised, due to e.g. some function is inline or eliminated. So BTW, does java have the concept of debug symbols/info when you need to take care when building the app?