breakpoints in a Grails script

How can I get the debugger to stop at a breakpoint in a Grails script, such as _GrailsTest.groovy?

I added the $GRAILS_HOME/scripts to the sources of my global grails-1.3.6 library, but the breakpoints there don't stop.  When I Ctrl-Shift-N to the script file, IntelliJ still gives me the choice of the .class file in $GRAILS_HOME/dist/grails-scripts-1.3.6.jar, as well as the .groovy file.  Does it not recognize them as the same thing?

I tried flagging my project's scripts directory as a source directory and copying _GrailsTest.groovy there, but even though that gets compiled into $HOME/.grails/1.3.6/projects/myProjectName/scriptCache, breakpoint in that copied source file still don't work.

1 comment
Comment actions Permalink

I just realized that the last thing I tried wouldn't work anyway.  The _Grails scripts can't be overridden in the project that way.  The

includeTargets << grailsScript("_GrailsWhatever")


doesn't look at the project's scripts.  I still want to be able to breakpoint in the Grails scripts, though.

I should add that I'm debugging by copying a run configuration, changing its 'run-app' to 'test-app', and running it with the debug button.  Breakpoints are working in plugin classes.

0

Please sign in to leave a comment.