Reputation: 1051
i want to debug Grails application in the eclipse kepler,i tried Debug As in eclipse and added break points but it runs normally as it in normal run mode , how i do that ? Thanks
Upvotes: 1
Views: 4559
Reputation: 1783
The grails-debug appears to be deprecated. Nowadays use:
grails --debug-fork run-app
Upvotes: 1
Reputation: 2676
in order to allow eclipse or any other debugger to connect to an external grails app running you need to start grails in debug mode:
grails-debug run-app
Doing this grails has to pause and wait for a remote debugger to connect.
Upvotes: 1
Reputation: 5689
Burt's answer from here
You can start a Grails app (one that has an Eclipse Grails nature, i.e. it was created in STS or was converted via Configure | Convert to Grails Project) in STS in debug mode using Run | Debug As | Grails Command (run-app)
You can also attach to any app that you start from the commandline via "grails-debug run-app" by creating a Debug Configuration. Go to Run | Debug Configurations and select Remote Java Application. Click the 'New' button or right-click the Remote Java Application node and select New. Select the project that you're debugging and give the configuration a meaningful name (I usually call them "attach "). Change the port from 8000 to 5005, and I always check the "Allow termination of remote VM" checkbox so I can kill the app from the IDE, but that's optional. Click Debug and it'll attach. Note that this will work for any Grails project that's in your workspace, not just ones that have a Grails nature.
Burt
Upvotes: 1