当前位置:网站首页>Remotely debug idea, configure remote debug, and add JVM startup parameter -xdebug in the program of remote server
Remotely debug idea, configure remote debug, and add JVM startup parameter -xdebug in the program of remote server
2022-07-27 23:34:00 【But don't ask about the future】
List of articles
Preface
stay The locally developed program runs on the server and reports an error And Lack of log information or even error logs when , Need to pass through Remote debugging To debug the program on the server
1. idea To configure remote debug
1.1 In the server program , add to JVM Launch parameters
stay Script to start the program in , namely java -jar command after , Add parameters that support remote debugging ( Default choice 5005 port , To avoid port conflicts , Other ports that are not commonly used can be selected )
-Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n
Parameter meaning :
-XDebug Enable remote debugging
-Xrunjdwp load JDWP Of JPDA Refer to the execution example
transport Used in debugging programs and VM Communication between processes used
dt_socket socket transmission
server=y/n VM Does it need to be executed as a debugging server
address=5005 The port number that the debugging server listens to
suspend=y/n Whether to start after debugging the client to establish a connection VM
Such as :
1.2 idea Connect to remote server , Remote debugging
Click on Add Configuration Then choose Remote
Set the remote server Ip And remote debugging port 
After adding breakpoints in local code , You can debug the code on the remote server 

notes :
If the firewall between the remote server and the local is not opened , You cannot perform remote debugging , It can be done by telnet ip port Command test communication 
2. Remote debugging principle
Java The program is unified in the form of bytecode JVM Run in , As long as the local code is the same as the class file on the remote server , Two JVM Communication through debug protocol , The local source code can be connected to the remote server JVM, Then perform remote debugging
边栏推荐
- 并发和并行有什么区别?
- How to quickly view the API properties and usage of the h.265 video player easyplayer?
- 进制转换方法
- 【图像检测】基于Combined Separability Filter实现鼻孔和瞳孔等圆检测matlab源码
- Node-RED系列(三十):使用持久化ui-table 刷新页面不清空上一次的table数据
- CSDN dedicated killer technology -- Google browser plug-in
- 华为鸿蒙 3 正式发布,这个安全功能解决了一大痛点
- Implicit indicators for evaluating the advantages and disadvantages of automated testing
- 请求合并哪家强——接口请求合并的3种技巧,性能直接爆表
- Security-001
猜你喜欢

Desai wisdom number - other charts (parallel coordinate chart): family's willingness to allocate assets in the future

简单实用的数据可视化案例

怎么使用C# Winform实现复制文件显示进度

Nature review: preferential effects in the formation of microbial communities

NDK series (6): let's talk about the way and time to register JNI functions

With double-digit growth in revenue and profit, China Resources Yibao has quietly created these new products worth more than 100 million

The wechat installation package has expanded 575 times in 11 years, and the up owner: "98% of the documents are garbage"; Apple App store was exposed to a large number of pornographic apps; Four techn

华为鸿蒙 3 正式发布,这个安全功能解决了一大痛点

技术认证 | 图扑软件携手华为云再创合作共赢新局面

Application skills of AWS dynamodb
随机推荐
Tita 的OKR系统与其他同类型产品,或者是共享文档等相比,有什么优势?
疫情之下,台积电一季度增长超预期,7nm占比35%!二季度或创新高
进程同步的方式有哪些?
Lanproxy映射本地开发环境
技术认证 | 图扑软件携手华为云再创合作共赢新局面
【信号处理】基于高阶统计量特征的通信系统中微弱信号检测附matlab代码
Jsonpath: a powerful rule parsing and parameter lookup tool for JSON
See how Gan controls the image generation style step by step? Explain the evolution process of stylegan in detail
Date的使用
采用汇顶屏下光学指纹方案,三星Galaxy A71 5G上市
四次挥手的Socket交互流程
What are the advantages of Tita's OKR system over other similar products or shared documents?
[signal processing] weak signal detection in communication system based on the characteristics of high-order statistics with matlab code
[CVA valuation training camp] how to quickly read the annual reports of listed companies - Lesson 4
Blood spitting finishing nanny level series tutorial - playing Fiddler bag capturing tutorial (5) - detailed explanation of fiddler monitoring panel
How to quickly view the API properties and usage of the h.265 video player easyplayer?
迪赛智慧数——其他图表(平行坐标图):家庭未来资产配置意愿
软件测试功能测试全套常见面试题【功能测试】面试总结4-2
股价暴涨180.46%!国产大硅片龙头沪硅产业上市:近4年净利累计不足6000万
寻找和利用 XXE – XML 外部实体注入