In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "IDEA how to remotely debug the server's java project". In the daily operation, I believe many people have doubts about how to remotely debug the server's java project in IDEA. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful for you to answer the doubt of "how to remotely debug the server's java project". Next, please follow the editor to study!
The server program runs on a remote server, and we can set a breakpoint in the local server code (provided that the local code must be consistent with the code run by the remote server). Whenever a request is made to the remote server, the internal state of the remote server at this time can be known locally.
Run the server code using the JVM parameter of remote debugging
-Xdebug-Xrunjdwp:transport=dt_socket,suspend=n,server=y,address=5005
Among them, 5005 is the port for remote debugging.
Local Idea connects to remote server debug port
Open Intellij IDEA and select "Edit Configurations …" on the top right. After going in, click the + sign and select "Remote". According to the following figure, just fill in the contents in the red box, where host is the ip/hostname,port of the machine on which the remote code is running, and the remote debugging port specified in the previous step is 5005 in this example.
Start debug mode
Now select "Edit Configurations …" in the previous step. Select the name of the remote created in the previous step, and then click the debug button on the right (which looks like the bug one) to view the console log. If words like "Connected to the target VM, address: 'xx.xx.xx.xx:5005', transport:' socket'" appear, the connection has been successful.
Set breakpoints and start debugging
Set the breakpoint, access the remote server to trigger the breakpoint, idea will automatically jump to the breakpoint, and the variable value also displays the variable value of the remote server.
At this point, the study on "how to remotely debug the java project on the server side of IDEA" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.