当前位置:网站首页>Idea remote breakpoint debugging jar package project
Idea remote breakpoint debugging jar package project
2022-07-03 09:48:00 【Enter the sky with one hand】
List of articles
Preface
springboot The project is being developed , Make it one jar package , Put it into the server runtime , If the report is wrong , How to check is more convenient ?
If the development environment , We can do it in IDEA Set a breakpoint , Easy debugging , But now it's already a jar The package is running on the server .
We can debug remote breakpoints jar Package the project ?
Sure .
One 、 preparation
1. jar Package application
Create your own springboot project , It's very simple , Just write an interface for debugging :
@GetMapping("/test")
public String test(){
int i = 1 / 0;
System.out.println(i);
return "success";
}
become involved jar package , Upload to a virtual machine node , I uploaded it here to 192.168.201.4
1. IDEA To configure
Click on Edit Configurations
choice Remote
Fill in information
Be careful : We just need to modify it Host That one is ok , Instead, we run it remotely jar The node of the package ip
Two 、 Breakpoint debugging
1. function jar package
In the previous step , IDEA Automatically generates a string of things , This is this. :
Copy it !
Go to the virtual machine node , Run the command to start the project :
java Copied instructions -jar Package name
I actually run the command :
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -jar demo.jar
The console can see , It's listening 5005 port 
2. Access interface
http://192.168.201.4:8087/test
3. Incoming breakpoint

3、 ... and 、 Be careful
I deliberately let the program throw exceptions here , And print the information , You can see , It's a little different from our local breakpoint ,IDEA The console will not output information , We can only view it on the console of the virtual machine node 
IDEA The console of always shows :

But stack information , Running object properties, etc , It can still be done in IDEA What I saw there
also , Running jar Package code and IDEA The code in should be consistent
summary
Welcome to point out my mistake !
边栏推荐
- [CSDN] C1 training problem analysis_ Part IV_ Advanced web
- Qt QComboBox QSS样式设置
- C language enumeration type
- Quickly use markdown to edit articles
- Failed building wheel for argon2 cffi when installing Jupiter
- Call the contents of Excel cells opened at the same time - button line feed
- The third paper of information system project manager in soft examination
- [CSDN] C1 training problem analysis_ Part II_ Web Foundation
- [graduation successful] [1] - tour [Student Management Information System]
- [combinatorics] Introduction to Combinatorics (context of combinatorics | skills of combinatorics | thought of combinatorics 1: one-to-one correspondence)
猜你喜欢

How does the nr-prach receiver detect the relationship between prembleid and Ta

UCI and data multiplexing are transmitted on Pusch - placement of data and UCI positions (Part III)
![顺利毕业[3]-博客系统 更新中。。。](/img/91/72cdea3eb3f61315595330d2c9016d.png)
顺利毕业[3]-博客系统 更新中。。。

uniapp 实现微信小程序全局分享及自定义分享按钮样式
![[combinatorics] Introduction to Combinatorics (combinatorial thought 2: mathematical induction | mathematical induction promotion | multiple induction thought)](/img/0e/dff6d3c6b7bf388bf71b0965533c25.jpg)
[combinatorics] Introduction to Combinatorics (combinatorial thought 2: mathematical induction | mathematical induction promotion | multiple induction thought)
![[csdn] C1 analyse des questions de formation Partie III Bar _ JS Foundation](/img/b2/68d53ad09688f7fc922ac65e104f15.png)
[csdn] C1 analyse des questions de formation Partie III Bar _ JS Foundation

Arduino handles JSON data, arduinojson assistant

Fundamentals of Electronic Technology (III)__ Chapter 1 resistance of parallel circuit
![[successful graduation] [1] - visit [student management information system]](/img/91/72cdea3eb3f61315595330d2c9016d.png)
[successful graduation] [1] - visit [student management information system]

Leetcode daily question (931. minimum falling path sum)
随机推荐
Fundamentals of Electronic Technology (III)__ Chapter 1 resistance of parallel circuit
PolyWorks script development learning notes (III) -treeview advanced operation
万字手撕七大排序(代码+动图演示)
QT sub window is blocked, and the main window cannot be clicked after the sub window pops up
DSP data calculation error
GPIO port details, Hal library operation keys
Matlab reads hexadecimal numbers and converts them into signed short
Error output redirection
Eight working modes of stm32gpio and chip naming rules
Leetcode daily question (745. prefix and suffix search)
端午节快乐!—— canvas写的粽子~~~~~
Development of fire power monitoring system
Flink learning notes (10) Flink fault tolerance mechanism
[CSDN] C1 training problem analysis_ Part III_ JS Foundation
UCI and data multiplexing are transmitted on Pusch - placement of data and UCI positions (Part III)
Starting from 0, use pnpm to build a demo managed by monorepo
Analysis of the implementation principle of an open source markdown to rich text editor
【男保姆式】教你打开第一个微信小程序
Stm32-hal library learning, using cubemx to generate program framework
[CSDN]C1训练题解析_第二部分_Web基础