当前位置:网站首页>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 !
边栏推荐
- PolyWorks script development learning notes (II) -treeview basic operations
- Learn the contents of 5g toolbox supporting NR through the NR resources provided by MATLAB
- Stm32-hal library learning, using cubemx to generate program framework
- Eight working modes of stm32gpio and chip naming rules
- Construction and test of TFTP server under unbuntu (Debian)
- Jestson Nano 从tftp服务器下载更新kernel和dtb
- GPIO port details, Hal library operation keys
- Fundamentals of Electronic Technology (III)_ Chapter 2 principle of amplification circuit__ Crystal triode and field effect triode
- Flink learning notes (IX) status programming
- Error output redirection
猜你喜欢

【22毕业季】我是毕业生yo~

Nr-prach:prach format and time-frequency domain

Oracle数据库 SQL语句执行计划、语句跟踪与优化实例

开学实验里要用到mysql,忘记基本的select语句怎么玩啦?补救来啦~

数字身份验证服务商ADVANCE.AI顺利加入深跨协 推进跨境电商行业可持续性发展

Electronic product design, MCU development, circuit cloning

IDEA远程断点调试jar包项目
![[22 graduation season] I'm a graduate yo~](/img/e2/5393b051e2d1cb4c307efdfb3f9148.png)
[22 graduation season] I'm a graduate yo~

Convert IP address to int
![[CSDN] C1 training problem analysis_ Part II_ Web Foundation](/img/91/72cdea3eb3f61315595330d2c9016d.png)
[CSDN] C1 training problem analysis_ Part II_ Web Foundation
随机推荐
Flink learning notes (XI) table API and SQL
Leetcode daily question (516. long palindromic subsequence)
Solve the problem of disordered code in vscode development, output Chinese and open source code
Hal library sets STM32 clock
UCI and data multiplexing are transmitted on Pusch - determine the bit number of harqack, csi1 and csi2 (Part II)
软件测试工程师是做什么的 通过技术测试软件程序中是否有漏洞
【力扣刷题笔记(二)】特别技巧,模块突破,45道经典题目分类总结,在不断巩固中精进
Jestson Nano 从tftp服务器下载更新kernel和dtb
Electronic product design
Process communication - semaphore
Vscode Arduino installation Library
文件系统中的目录与切换操作
Fundamentals of Electronic Technology (III)__ Fundamentals of circuit analysis__ Basic amplifier operating principle
Global KYC service provider advance AI in vivo detection products have passed ISO international safety certification, and the product capability has reached a new level
Eight working modes of stm32gpio and chip naming rules
Vector processor 9_ Basic multilevel interconnection network
Project cost management__ Cost management technology__ Article 7 completion performance index (tcpi)
Construction and test of TFTP server under unbuntu (Debian)
Development of fire power monitoring system
Learn the contents of 5g toolbox supporting NR through the NR resources provided by MATLAB