1. gradle bootRun --debug-jvm

加上--debug-jvm, gradle会默认打开5005端口等待远程连接

2. 在IntelliJ IDEA里加Remote, 绑定5005端口:

IntellJ IDEA如何调试Gradle项目

3. Debug Remote连接

控制台出现:

Connected to the target VM, address: 'localhost:5005', transport: 'socket'

说明连接建立成功

4. 设置断点,调试成功

相关文章:

  • 2021-07-17
  • 2021-05-20
  • 2022-12-23
  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
  • 2021-11-04
猜你喜欢
  • 2021-04-19
  • 2021-06-21
  • 2021-12-17
  • 2021-05-31
  • 2021-12-04
相关资源
相似解决方案