breakpoints not recognised in groovy code, IDEA 7.0.3

hi

I'm using JetGroovy for grails development; breakpoints work ok in newly created apps, but in my main app they are not recognised when placed in my own code (e.g. a controller action).

Setting breakpoints in grails code works.

I've tried both remote and local debug configurations. The command line for the VM for the remote case was:
JAVA_OPTS="-Xms512M -Xmx2048M -server -XX:PermSize=128M -XX:MaxPermSize=512M -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005" GRAILS_HOME=/home/hamish/ext/gatewiki/cow/../grails ../grails/bin/grails -Dgate.cow.user.home=/home/hamish -Dgate.cow.mode=workstation -Dgate.cow.user.home=/home/hamish/ext/gatewiki/cow/dev-user-home run-app

I'm on grails 1.0.1, groovy 1.5.4, jdk 1.6 (but also tried 1.5)

any ideas?

thanks

--
Hamish
http://www.dcs.shef.ac.uk/~hamish/

0
Avatar
Permanently deleted user

Really weird. Does your code get executed to stop at breakpoint. Sorry for the dumb question, but I really fail to come up with any explanation...

0
Avatar
Permanently deleted user

hi eugene

I got a breakpoint to work in a service (in grails-app/services); when I then step through the code until the service returns and it should step back into the controller action I get a "Debug info unavailable" message

it seems like the controller is not being compiled with debug info included?

I wonder why that might happen?

thanks, best

hamish

0
Avatar
Permanently deleted user

Well, are you sure it is compiled by groovyc, and this is not the output of the stub compiler?

0
Avatar
Permanently deleted user

hi,

what is the stub compiler?

my ant build uses grails to build the controllers; in IDEA I'm using whatever jetgroovy defaults to

best,

hamish

0
Avatar
Permanently deleted user

OK, if you use IDEA's make (ctrl-F9), then there are several compilation phases, one of them creates java toplevel view for groovy files to feed to javac - this is done to break circular dependencies in mixed java/groovy projects. The later phase invokes groovy compiler that should overwrite stub output with actual groovyc output. However if groovyc for some reason fails, then compiled stubs remain on disk.

Eugene.

0
Avatar
Permanently deleted user

thanks, that sounds like it might be the problem (although groovyc works from my ant build on the same code)

how would I check?

I wonder if it can be though, as I'm running the debugger remotely, and the controller is working fine (i.e. it has definitely compiled ok on the remote VM). IDEA connects to the remote VM, and allows me to step through code in a service class, but not in the controller class

could this be a problem with compiler settings?

thanks for your help, best

hamish

0
Avatar
Permanently deleted user

it seems that the answer to this is that the breakpoint has to be created while the debugger is running and connected to the remote jvm

(in which case the red dot has a tick in it, which doesn't appear when creating a breakpoint if the debugger is not running)

hth

best
h

0

请先登录再写评论。