Breakpoints not working for Grails 3.2.5 project In IntelliJ Idea Ultimate 2016.3.4
已回答
We have started working on a Grails 3.2.5 project using IDEA Ultimate 2016.3.4. I have used IDEA Ultimate 14.0.6 with Grails 2.4.4 without any issues, however, in this upgrade project the breakpoints in dubugger mode doesn't seem to be working. It never stops at the breakpoints. In the debugger window, the only message I see is:
- Connecting to the target VM, address: '127.0.0.1:59765', transport: 'socket'
请先登录再写评论。
Please file a bug at https://youtrack.jetbrains.com/issues/IDEA with a sample project and the exact steps to reproduce. Specify Java/Grails versions you are using.
Make sure connection is not blocked by a firewall.
The thing is, the breakpoints work in a newly created blank project. However, it doesnt work in my upgraded project. Below are the logs from the application server startup in debug mode for both projects:
Breakpoints working project:
|Running application...
Listening for transport dt_socket at address: 49855
Connected to the target VM, address: '127.0.0.1:49855', transport: 'socket'
Grails application running at http://localhost:8080 in environment: development
Breakpoints failing project:
|Running application...
Configuring Spring Security Core ...
... finished configuring Spring Security Core
Grails application running at http://localhost:8080 in environment: development
As you can see, IDEA is able to connect to the debug port successfully in the blank project but not in the other one.
Please do Gradle Refresh and try again.
No luck. Can anyone guide me as to where can I check the settings for debug port in IntelliJ?
These is no such setting. IntelliJ chooses first available debug port automatically to prevent collisions.
Please describe steps how you upgraded the project.
Also please check if you are affected by https://youtrack.jetbrains.com/issue/IDEA-164546
Wow, that helped a lot! Thanks Daniil!
For other's reference, changing from
bootRun {
jvmArgs = ['-Dspring.output.ansi.enabled=always']
}
To
bootRun {
jvmArgs('-Dspring.output.ansi.enabled=always')
}
In build.gradle helped.