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 configure remote debugging jar packages using idea

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly introduces how to configure the use of idea remote debugging jar package, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.

1. Start the project remotely

Configure JVM parameters to run

-Xdebug-Xrunjdwp:transport=dt_socket,suspend=n,server=y,address=$ {debug_port}

Start an example:

Java-Xdebug-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=80-jar demo.jar

Nohup java-Xdebug-Xrunjdwp:transport=dt_socket,suspend=n,server=y,address=8189-Dfile.encoding=utf-8-jar demo.jar > demo.log 2 > & 1 &

-Dfile.encoding=utf-8, but not.

Parameter meaning:

-XDebug enables debugging

-Xnoagent disables the default sun.tools.debug debugger

-Djava.compiler=NONE forbids loading of JIT compiler

-Xrunjdwp loads the JPDA reference execution example of JDWP

Transport is used to communicate between debuggers and processes used by JVM

Dt_socket socket transmission

Whether server=y/n JVM needs to be executed as a debugging server

The port number on which the address=2345 debug server is listening

Whether suspend=y/n starts JVM after the debug client establishes a connection

Note: the-jar parameter cannot be written before the-XDebug parameter

2.idea configuration

Choose to add a Remote, configure debug ip or domain name and port port.

Use module classpath: select a debug module

3.debug start

You can break the mode.

4. Connected successfully

Note: need to ensure consistency between local and remote code

The following error indicates that the jar was not executed or the jar package was not executed successfully, resulting in a failure to connect

Thank you for reading this article carefully. I hope the article "how to configure and use idea to debug jar packages remotely" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you 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