There are some rather long winded ways of applying remote debuggers, and Ted does a great job of breaking the problem down and offering a solution. However, in my rather tiny Grails application I was happy to sacrifice the benefits of forked execution - at least for my tests.
So, in BuildConfig.groovy I changed the following block:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**** FROM ****/ | |
grails.project.fork = [ | |
test: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, daemon:true], | |
run: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false], | |
war: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false], | |
console: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256] | |
] | |
/**** TO ****/ | |
grails.project.fork = [ | |
test: false, | |
run: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false], | |
war: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false], | |
console: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256] | |
] |
This change tells Grails that when we run the test configuration it shouldn't run in forked mode - this is anything we would run using the 'test-app' Grails command.