当前位置:网站首页>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 !
边栏推荐
- Nodemcu-esp8266 development (vscode+platformio+arduino framework): Part 3 --blinker_ MIOT_ Light (lighting technology app control + Xiaoai classmate control)
- Flink learning notes (10) Flink fault tolerance mechanism
- Code word in NR
- DSP data calculation error
- 1300. sum of varied array closed to target
- 【順利畢業】[1]-遊覽 [學生管理信息系統]
- Vscode Arduino installation Library
- [successful graduation] [1] - visit [student management information system]
- Learn the contents of 5g toolbox supporting NR through the NR resources provided by MATLAB
- Fundamentals of Electronic Technology (III)_ Integrated operational amplifier and its application__ Basic arithmetic circuit
猜你喜欢

MySQL environment variable configuration

What do software test engineers do? Pass the technology to test whether there are loopholes in the software program

Leetcode daily question (2090. K radius subarray averages)

Directory and switching operation in file system
![[CSDN]C1训练题解析_第二部分_Web基础](/img/91/72cdea3eb3f61315595330d2c9016d.png)
[CSDN]C1训练题解析_第二部分_Web基础

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

The cyclic shift of PUCCH in NR channel is generated by MATLAB
![[CSDN] C1 training problem analysis_ Part III_ JS Foundation](/img/b2/68d53ad09688f7fc922ac65e104f15.png)
[CSDN] C1 training problem analysis_ Part III_ JS Foundation

小王叔叔的博客目录【持续更新中】

Nr-prach:prach format and time-frequency domain
随机推荐
Hal library sets STM32 clock
STM32 external interrupt experiment
开学实验里要用到mysql,忘记基本的select语句怎么玩啦?补救来啦~
PolyWorks script development learning notes (II) -treeview basic operations
MySQL environment variable configuration
Win10 install elk
Jetson nano custom boot icon kernel logo CBOOT logo
Error output redirection
307. Range Sum Query - Mutable
Vector processor 9_ Basic multilevel interconnection network
[male nanny style] teach you to open the first wechat applet
Development of fire power monitoring system
Long类型的相等判断
Please tell me how to set vscode
[successful graduation] [1] - visit [student management information system]
Install local sources using yum
Leetcode daily question (1856. maximum subarray min product)
Jestson nano custom root file system creation (supports the smallest root file system of NVIDIA Graphics Library)
Schematic diagram and connection method of six pin self-locking switch
Oracle数据库 SQL语句执行计划、语句跟踪与优化实例