idea 调试 java,将Intellij-IDEA调试器附加到正在运行的java进程

本文介绍了如何将IntelliJ IDEA的调试器连接到正在运行的Java进程。首先创建远程运行配置,然后在JVM选项中添加允许远程调试的参数,最后启动应用并选择配置进行调试。
摘要由CSDN通过智能技术生成

Is it possible to attach Intellij-IDEA debugger to a running java process?

解决方案

Yes! Here is how you set it up.

Run Configuration

Create a Remote run configuration:

Run -> Edit Configurations...

Click the "+" in the upper left

Select the "Remote" option in the left-most pane

Choose a name (I named mine "remote-debugging")

Click "OK" to save:

EyBec.png

JVM Options

The configuration above provides three read-only fields. These are options that tell the JVM to open up port 5005 for remote debugging when running your application. Add the appropriate one to the JVM options of the application you are debugging. One way you might do this would be like so:

export JAVA_OPTS="-agentlib

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值