In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "Springboot's jar package remote debugging details", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn the "Springboot jar package remote debugging details" bar!
1. Idea packing
Second, jar packet location after install
Run the program (start up by remote debugging)
Find the path where jar is located, enter the cmd window, and use the following command to listen to port 5005 (which has nothing to do with the port 8089 of the program)-remote debugging startup statement:
/ / find the corresponding jar package directory, and execute the following statement in the cmd window to java-Xdebug-Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n-jar mac-test-0.0.1-SNAPSHOT.jar.
Normal startup statement:
/ / ordinary jar package startup statement java-jar mac-test-0.0.1-SNAPSHOT.jar-- spring.profiles.active=test > > / var/log/mac-test.log 2 > & 1 & description: spring.profiles.active=test: in the case of multi-environment configuration, test refers to the test environment and corresponds to the application-test.properties configuration file It means to run the configuration of the test environment / var/log/mac-test.log: it means to output all the logs of the program to the mac-test.log file under / var/log. General projects will configure a logging framework, such as log4j, etc. Startup configures a specific log output path.
The startup log is as follows:
4. Start successful verification
The project is configured with swagger, which can be accessed by visiting the http://localhost:8089/swagger-ui.html page
Add remote debugging configuration to idea
Go to the idea settings page and determine the Host to be listened to. The local test is localhost, and the default is port 5005, which needs to be consistent with the port in cmd where the listening statement is executed. If you are debugging for the server, configure host as the server ip.
6. Start debugging monitoring
Startup log
7. If you request verification in swagger, you will enter the local code breakpoint
At this point, I believe that everyone on the "Springboot jar package remote debugging details" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.