1. gradle bootRun --debug-jvm
加上--debug-jvm, gradle会默认打开5005端口等待远程连接
2. 在IntelliJ IDEA里加Remote, 绑定5005端口:
3. Debug Remote连接
控制台出现:
Connected to the target VM, address: 'localhost:5005', transport: 'socket'
说明连接建立成功
4. 设置断点,调试成功
1. gradle bootRun --debug-jvm
加上--debug-jvm, gradle会默认打开5005端口等待远程连接
2. 在IntelliJ IDEA里加Remote, 绑定5005端口:
3. Debug Remote连接
控制台出现:
Connected to the target VM, address: 'localhost:5005', transport: 'socket'
说明连接建立成功
4. 设置断点,调试成功