IDEA 远程调试 Remote JVM Debug
IDEA 远程调试 Remote JVM Debug
IDEA中可以使用 remote jvm debug进行程序的远程调试
1. IDEA配置Remote JVM Debug
在IDEA中可以点击Run/Debug Configurations, 再点击"+"号添加一个Remote JVM Debug,并填写远程服务器的IP地址和端口号
2. 使用参数运行程序
参数
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
启动程序
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -jar demo-0.0.1-SNAPSHOT.jar
3. 启动IDEA进行debug
使用此方法,可以连接到远程服务器,在本地代码中打上断点,拦截请求至本地,进行debug调试,十分方便!
qq_39948759: C:\Users\12157\AppData\Roaming\JetBrains\IntelliJIdea2023.2\options\recentProjects.xml
Fy哥: 感谢,但是我的 recent 文件不一样,可以通过 everything 工具搜索 recent 文件
月下三木曲: 第四个非常棒!
呼哈873: 谢谢,就是昨天我是按着来的,但是他说超过数值范围,我就有点奇怪
@ chen: 哪个idx,就是普通的递增的一个变量,用来给图片命名的,1.jpg,,2.jpg……