Quantcast

How to debug in STS

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to debug in STS

Tommie
Hello,
 
it seems that at least a few persons (kht!) on this list have managed to debug Grails in STS 2.3. Could someone maybe distribute the main points to get to this point?
 
Many thanks
Thomas
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to debug in STS

burtbeckwith
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 <projectname>"). 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

> Hello,
>
> it seems that at least a few persons (kht!) on this list have managed to
> debug Grails in STS 2.3. Could someone maybe distribute the main points to
> get to this point?
>
> Many thanks
> Thomas

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to debug in STS

Tommie
Thanks, Burt,
 
actually I finally managed to do the local debugging last evening by
- setting GRAILS_HOME and JAVA_HOME in the debug configuration
- ignoring the warnings about missing line numbers
 
I didn't manage though to debug a test case (test-app). Any ideas about this?
 
I haven't started yet to do remote debugging but will surely save your comments for the time I have to.
 
Thanks

On Thu, Mar 4, 2010 at 11:32 PM, Burt Beckwith <[hidden email]> wrote:
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 <projectname>"). 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

> Hello,
>
> it seems that at least a few persons (kht!) on this list have managed to
> debug Grails in STS 2.3. Could someone maybe distribute the main points to
> get to this point?
>
> Many thanks
> Thomas

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to debug in STS

burtbeckwith
Use the remote debugging procedure to debug integration tests (unit tests can run in the IDE). Run 'grails-debug test-app' and attach in STS like you would for run-app.
 
Burt

> Thanks, Burt,
>
> actually I finally managed to do the local debugging last evening by
> - setting GRAILS_HOME and JAVA_HOME in the debug configuration
> - ignoring the warnings about missing line numbers
>
> I didn't manage though to debug a test case (test-app). Any ideas about
> this?
>
> I haven't started yet to do remote debugging but will surely save your
> comments for the time I have to.
>
> Thanks
>
> On Thu, Mar 4, 2010 at 11:32 PM, Burt Beckwith <[hidden email]>wrote:
>
> > 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 <projectname>"). 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
> >
> > > Hello,
> > >
> > > it seems that at least a few persons (kht!) on this list have managed to
> > > debug Grails in STS 2.3. Could someone maybe distribute the main points
> > to
> > > get to this point?
> > >
> > > Many thanks
> > > Thomas
> >
> >  ---------------------------------------------------------------------
> > To unsubscribe from this list, please visit:
> >
> >    http://xircles.codehaus.org/manage_email
> >
> >
> >
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Loading...