当前位置:网站首页>Idea remote debugging
Idea remote debugging
2022-07-27 05:21:00 【_ Dean_】
idea Remote debugging debug
Configure remote debugging parameters



Add the generated parameters to the remote host startup script , start-up
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5555
Start command
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5555 -jar xxx.jar --spring.profiles.active=test

Turn on remote debugging

The figure below represents that debugging can be started , If not, it may not be connected

Because my breakpoint is in the verification code , Just call this method

If the firewall is turned on by the remote server and the rules are not configured, the connection will fail
sudo vim /etc/sysconfig/iptables # Open the firewall rule file
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5005 -j ACCEPT # Configure firewall rules
sudo systemctl restart iptables # Restart and take effect
Turn off debugging
- It is not safe to open multiple ports on the server , After debugging, the firewall settings can be restored .
- and Java Server on Debug The functions of the server can be preserved , For later debugging .
summary
Remote debugging is not so useful , Can not act as Long term use Debugging tools for . It can only be used as a means of temporary debugging .
There are several difficulties :
1、 It is difficult to ensure that the local code is consistent with the remote code , And it is difficult to judge whether it is consistent
2、 Through remote debugging, we found bug, But it cannot be repaired immediately and then continue debugging , You can only continue remote debugging after repair and deployment
边栏推荐
- JVM上篇:内存与垃圾回收篇十--运行时数据区-直接内存
- The provision of operation and maintenance manager is significantly affected, and, for example, it is like an eep command
- B1022 a+b in d-ary
- B1027 打印沙漏
- 如何快速有效解决数据库连接失败问题
- 精选用户故事|洞态在聚水潭的误报率几乎为0,如何做到?
- JVM Part 1: memory and garbage collection part 10 - runtime data area - direct memory
- 学生管理系统
- Could not autowire. No beans of ‘userMapper‘ type found.
- During its low-level period, this slave edge causes the instruction number to make a corresponding model
猜你喜欢

JVM上篇:内存与垃圾回收篇三--运行时数据区-概述及线程

String class

Differences among left join, inner join and right join

Gradio quickly builds ml/dl Web Services

Constraints of MySQL table

Scientific Computing Library - numpy

JVM上篇:内存与垃圾回收篇--运行时数据区四-程序计数器

MQ message queue is used to design the high concurrency of the order placing process, the generation scenarios and solutions of message squeeze, message loss and message repetition

Scientific Computing Library -- Matplotlib

1、 MySQL Foundation
随机推荐
JVM上篇:内存与垃圾回收篇--运行时数据区四-程序计数器
Tcp server是如何一个端口处理多个客户端连接的(一对一还是一对多)
[Niuke discussion area] Chapter 7: building safe and efficient enterprise services
Event filter
抽卡程序模拟
During its low-level period, this slave edge causes the instruction number to make a corresponding model
JVM上篇:内存与垃圾回收篇七--运行时数据区-堆
笔记系列之docker安装Postgresql 14
数据库连接池&&Druid使用
Create datasource using Druid connection pool
B1031 查验身份证
枚举类实现单例模式
2021 OWASP top 5: security configuration error
Introduction to dynamic memory functions (malloc free calloc realloc)
简化JDBC的MyBits框架
消息可靠性处理
ERP system brand
35.滚动 scroll
Bean's life cycle & dependency injection * dependency auto assembly
Derivation and explanation of PBR physical illumination calculation formula