how to debug Grails 2.3.0 in
today Grails 2.3.0 was released
what is the correct way to debug Grials application from IDEA 12 and IDEA 13 (Cardea) ?
configuring -debug run-app in run config starts the application, but
- break points do not stop execution and
- I have to manualy execute grails stop-app to be able to re-run application
Please sign in to leave a comment.
My temporary solution is to comment out "run" config in grails.project.fork in BuildConfig.groovy.
grails.project.fork = [
// configure settings for compilation JVM, note that if you alter the Groovy version forked compilation is required
// compile: [maxMemory: 256, minMemory: 64, debug: false, maxPerm: 256, daemon:true],
// configure settings for the test-app JVM, uses the daemon by default
test: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, daemon:true],
// configure settings for the run-app JVM
// TODO enable this when IDEA will fix the issue
// run: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
// configure settings for the run-war JVM
war: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
// configure settings for the Console UI JVM
console: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256]
]
Will this be changed in the future ?
Does changing 'debug: false' to 'debug: true' do anything?
that will start remote debugger and I it is possible to use IDE's "Run/Debug Configurations"/Add/Remote
Grails will start and wait until remote debug connection is established with message:
Listening for transport dt_socket at address: 5005
when you stop debugging session in IDEA the grails process will continue to run in background and not even "grails stop-app" will stop it. i had to kill the java process running for grails
According to the docs, you should add '--debug-fork to the command line, e.g., 'grails run-app --debug-fork'. I develop with Grails but can't update to 2.3 for a little while so I can't really test this yet.