springboot 远程debug


springboot 远程debug

                          

应用:本地打断点,对运行在远程服务器上的程序进行调试

                       

                                         

*******************

远程调试

                

原理:本地jvm程序与远程jvm程序代码保持一致,通过调试协议进行通信

                         

attach 模式:远程服务器暴露端口、开启监听,本地连接远程服务器

                          

                     

listen 模式:本地暴露端口、开启监听,远程应用连接到本地

                          

                              

相关参数

-Xdebug:开启远程调试

jwdp参数,格式:
-Xrunjwdp:name=value,name2=value2,...
-agentlib:jwdp:name=value,name2=value2,...

jwdp name可选值:
transport:远程debug程序连接方式,dt_socket(默认)、dt_shmem(共享内存)
server:y(debug服务端)、n(默认,debug客户端)
address:server=n时必须设置;server=y时,可不设置

launch:jwdp初始化完成后,启动指定的程序(可选)
onthrow:指定异常发生后,开始jwdp的初始化(可选)
onuncaught:y(未捕获的异常发生后,开始jwdp的初始化)(可选)
            n(默认,jwdp正常初始化)

stdalloc:n(默认值),可选
          By default, the JDWP reference implementation uses an alternate allocator for its memory allocation. 
          If “y”, the standard C runtime library allocator will be used. This option is mainly for testing; use it with care. 
          Deadlocks can occur in this VM if the alternative allocator is disabled
strict:n(默认值),可选
        If “y”, assume strict JVMDI conforma
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值