Quantcast
Channel: SCN : Blog List - All Communities
Viewing all articles
Browse latest Browse all 2548

An example of Java Remote debug

$
0
0

1. start Jetty server under debug mode via mvn jetty:run

clipboard1.png

2. In Eclipse, create a new Debug configuration->Remote Java Application

clipboard2.png

Specify Host as localhost and port 8000:

clipboard3.png

Click debug button:

clipboard4.png

You should observe that the Jetty server listening to port 8000 has accepted this debug request and start application via localhost:8080 now:

clipboard5.png

3. go to localhost:8080, perform action to trigger the breakpoint:

clipboard6.png

And now in Eclipse, breakpoint is triggered!

clipboard7.png

Note: if you meet with error message "bind error, address already in use", please first use "netstat -lp" to find the process id which occupies the address and kill that process by kill -9 <pid>.

clipboard8.png

clipboard9.png

If still does not work, restart the virtual machine instance.


Viewing all articles
Browse latest Browse all 2548

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>