In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
How to debug Springboot remotely in IDEA, many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can get something.
First, open Edit configurations and click the + sign to create a Remote application.
Fill in the name and configure the Host address (remote server address) and port (choose an unoccupied port). Then copy the parameters under For JDK1.4.x. The port configured for the example is 5005.
-Xdebug-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
After the above steps, you have obtained the parameters to start the remote server. The java command is used by default when starting springboot. For example, the example project startup command is:
$java-jar remotedebug-0.0.1-SNAPSHOT.jar
Then add the parameters obtained above to the startup command at this time (for non-springbboot projects, you can add more configurations to the corresponding environment variables):
$java-jar-Xdebug-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 remotedebug-0.0.1-SNAPSHOT.jar
In this way, the server will listen on port 5005. You can check whether the monitoring was successful with the following command:
Netstat-anp | grep 5005docker
If the application runs in the container, you only need to modify the Dockerfile. Examples are as follows
FROM java:8COPY target/agents.jar / app.jarEXPOSE 8080EXPOSE 5005ENTRYPOINT ["java", "- jar", "- agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005", "- Dspring.profiles.active=sit", "/ app.jar"]
The addition of server-side parameters has been completed through the above steps. Let's start the Remote service that we just configured. At startup, we will find that this startup program only has debug startup mode.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
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.