当前位置:网站首页>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 II_ Web Foundation
- Jestson nano custom root file system creation (supports the smallest root file system of NVIDIA Graphics Library)
- Project cost management__ Topic of comprehensive calculation
- Process communication - semaphore
- Development of electrical fire system
- [CSDN]C1训练题解析_第三部分_JS基础
- Directory and switching operation in file system
- PolyWorks script development learning notes (I) - script development environment
- Hal library sets STM32 clock
- Uncle Wang's blog directory [constantly updating]
猜你喜欢
UCI and data multiplexing are transmitted on Pusch (Part VI) -- LDPC coding
Design and development of biological instruments
Project cost management__ Cost management technology__ Article 6 prediction
NR PUCCH format0 sequence generation and detection mechanism
一款开源的Markdown转富文本编辑器的实现原理剖析
【順利畢業】[1]-遊覽 [學生管理信息系統]
[CSDN]C1训练题解析_第二部分_Web基础
Hal library sets STM32 clock
STM32 port multiplexing and remapping
Flink CDC practice (including practical steps and screenshots)
随机推荐
How MySQL modifies null to not null
Nr--- Pusch I: sorting out the agreement process
Nr-prach: access scenario and access process
PolyWorks script development learning notes (II) -treeview basic operations
Install local sources using yum
[22 graduation season] I'm a graduate yo~
Jestson Nano 从tftp服务器下载更新kernel和dtb
[graduation successful] [1] - tour [Student Management Information System]
2021-09-26
Leetcode daily question (2090. K radius subarray averages)
Send mail using WP mail SMTP plug-in
Quickly use markdown to edit articles
Make the most basic root file system of Jetson nano and mount NFS file system on the server
Vscode Arduino installation Library
Leetcode daily question (931. minimum falling path sum)
Process communication - semaphore
Starting from 0, use pnpm to build a demo managed by monorepo
[CSDN]C1训练题解析_第三部分_JS基础
Project cost management__ Cost management technology__ Article 7 completion performance index (tcpi)
Flink CDC practice (including practical steps and screenshots)