Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Springboot to realize remote debugging in IDEA

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article focuses on "how to use Springboot to achieve remote debugging in IDEA", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to use Springboot to achieve remote debugging in IDEA.

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 following parameters of 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 test-tool.jar

Then add the parameters obtained above to the startup command at this time:

Java-jar-Xdebug-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 test-tool.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 5005

The addition of server-side parameters has been completed through the above steps. Let's start the Remote service just configured, that is, test-tool-remote. At startup, we will find that this startup program only has debug startup mode.

When the startup is complete, hit a breakpoint on the code that requires debug. The remaining operation step is to access the business request corresponding to the remote server, and the local debug will be synchronized. The rest of the operation is the same as the local debug, so I won't repeat it here.

At this point, I believe you have a deeper understanding of "how to use Springboot to achieve remote debugging in IDEA". You might as well do it in practice. 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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report