首先说明必须启动两个进程,使用java的remote模式
Prepare "Remote Debug" configuration
-
Select menu "Run/Edit Configurations".
Check: "Run/Debug Configurations" dialog pops up.
-
Click on "+" icon, select "Remote" from the list.
Check: new configuration with name "Unnamed" appears under "Remote" category.
-
Change configuration name to something more sensible, like "Remote Debug".
-
Don't change any other parameters, just click "OK".
Run web-application under the debugger
-
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.
-
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.
因为这是一个孤立的进程,必须手工结束。
阅读(2009) | 评论(0) | 转发(0) |