当前位置:网站首页>idea远程调试
idea远程调试
2022-07-27 08:03:00 【aiwokache】
一 业务:服务器与本地环境不一样
二 需求:如果服务器报错,使用本地idea进行远程debug调试
三 解决方案:本地idea远程debug调试
四 具体操作
1 第一步:IDEA打开远程启动的springboot应用程序所对应的本地springboot应用的Edit Configuration

2 第二步:"+"号。Remote。配置远程服务器的ip和本地需求监听的端口。


注意:注意端口别被占用。后续这个端口是用来跟远程的java进程通信的。
可以注意到:切换不同的jdk版本,生成的脚本不一样
- 选择 jdk1.4,则为
- -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=50055。这就是你为什么搜其他博客,会有这种配置的原因,其实这个配置也是可行的。但更准确应该按照下面jdk5-8的配置
- 选择 jdk 5-8,则为
- -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=50055
- 选择 jdk9以上,则为
- -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:50055。据说因为jdk9变得安全了,远程调试只允许本地,如果要远程,则需要在端口前配置*
3 第三步:使用下列linux命令启动远程的应用程序
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -jar tf-bws-admin.jar

4 第四步: 启动本地应用的remote

5 第五步:可以使用debug调试了
五 参考
边栏推荐
- 数据提取1
- [pytorch] resnet18, resnet20, resnet34, resnet50 network structure and Implementation
- Shell enterprise interview exercise
- Happy holidays, everyone
- shell脚本学习day01
- Promise详解
- MCU multi-level menu
- How to update PIP3? And running PIP as the 'root' user can result in broken permissions and conflicting behavior
- C language: optimized Hill sort
- Do me a favor ~ don't pay attention, don't log in, a questionnaire in less than a minute
猜你喜欢

Leetcode56. Consolidation interval
![[flight control development foundation tutorial 4] crazy shell · open source formation UAV - serial port (optical flow data acquisition)](/img/49/8e5374fee0cbf48115159ac3ff23c6.png)
[flight control development foundation tutorial 4] crazy shell · open source formation UAV - serial port (optical flow data acquisition)

抽象工厂模式

How to play with the purchase of SAP variant materials? Look at this article and you will understand

Is redis really slowing down?

Enhancement: BTE process introduction

C# 事件用法案例 订阅事件+=

孙子出题难,儿子监考严。老子不会做,还我上学钱

Digital transformation driven by enterprise architecture!

帮个忙呗~不关注不登录,不到一分钟的一个问卷
随机推荐
Stored procedures and functions
MySQL table name area in Linux is not case sensitive
Happy holidays, everyone
shell脚本学习day01
Shell awk related exercises
2020 International Machine Translation Competition: Volcano translation won five championships
Shell enterprise interview exercise
C event usage case subscription event+=
将对象转换为键值对
Do me a favor ~ don't pay attention, don't log in, a questionnaire in less than a minute
物来顺应,未来不迎,当时不杂,既过不恋
[applet] how to get wechat applet code upload key?
自动化测试的使用场景
Digital transformation driven by enterprise architecture!
API 版本控制【 Eolink 翻译】
C language: random generated number + insertion sort
C语言:随机生成数+插入排序
物联网工业级UART串口转WiFi转有线网口转以太网网关WiFi模块选型
【目标检测】YOLOv6理论解读+实践测试VisDrone数据集
C#委托的使用案例