Today, my colleague asked me how to remotely debug JavaProgram. I don't know. Search now. Just add data in the program at the height. Then, it is too convenient to specify the Port during eclipse debugging.
For example, there isCode:
Export this Java as a remoting-debug.jar to upload to the target machine (of course local ). Then run the following command on the target machine:
Java-xdebug-xrunjdwp: Transport = dt_socket, Server = Y, address = 8000-jar remoting-debug.jar
The following error occurs: listening for transport dt_socket at address: 8000.
The program is waiting for debugging.
Right-click the remotingdebug code in eclipse-> debug as...-> debug configurations..., and double-click Remote Java application, for example:
192.168.1.100 is a local virtual machine. The debugging is convenient.
Extension: Eclipse remote debugging Tomcat program.
You can add JPDA at the end of startup. BAT in Tomcat 6, as shown below:
SetJpda'address = 8017
Call"% Executable %" JPDAStart% __Line_args %
If you do not need to set jpda_address = 8017, the default port 8000 is used.
Related Words: