Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4137746
  • 博文数量: 447
  • 博客积分: 1241
  • 博客等级: 中尉
  • 技术积分: 5786
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-27 06:48
个人简介

读好书,交益友

文章分类

全部博文(447)

文章存档

2023年(6)

2022年(29)

2021年(49)

2020年(16)

2019年(15)

2018年(23)

2017年(67)

2016年(42)

2015年(51)

2014年(57)

2013年(52)

2012年(35)

2011年(5)

分类: Java

2018-11-02 11:00:55

首先说明必须启动两个进程,使用java的remote模式

Prepare "Remote Debug" configuration


  1. Select menu "Run/Edit Configurations".

    Check: "Run/Debug Configurations" dialog pops up.
  2. Click on "+" icon, select "Remote" from the list.

    Check: new configuration with name "Unnamed" appears under "Remote" category.
  3. Change configuration name to something more sensible, like "Remote Debug".
  4. Don't change any other parameters, just click "OK".

Run web-application under the debugger

  1. Start gradle task "appStartDebug" under IntelliJ IDEA.

    Attention: do not try to start this task under the debugger. Run it in normal mode.

    Check: you should see "Listening for transport dt_socket at address: 5005" in "Run" output window.
  2. Select menu "Run/Run...", select "Remote Debug" configuration, select "Debug" command.

    Check: you should see "Connected to the target VM, address: 'localhost:5005', transport: 'socket'" in "Debug" output window.

    Check: you should see "Run 'gradle appStop' to stop the server." in "Run" output window.



Important: you should stop debugged web-application via gradle task "appStop". Otherwise there will be process hanging.
因为这是一个孤立的进程,必须手工结束。
阅读(1960) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~