2.8 Running and Debugging an Application 3.1.1

See the light - agile, industrial strength, rapid web application development made easy

(Quick Reference) # 2.8 Running and Debugging an Application - Reference Documentation Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith, Lari Hotari Version: 3.1.1 ## 2.8 Running and Debugging an Application Grails applications can be run with the built in Tomcat server using the run-app command which will load a server on port 8080 by default:
    grails run-app
You can specify a different port by using the `server.port` argument:
    grails -Dserver.port=8090 run-app
Note that it is better to start up the application in interactive mode since a container restart is much quicker:
    $ grails
    grails> run-app
    | Server running. Browse to http://localhost:8080/helloworld
    | Application loaded in interactive mode. Type 'stop-app' to shutdown.
    | Downloading: plugins-list.xml
    grails> stop-app
    | Stopping Grails server
    grails> run-app
    | Server running. Browse to http://localhost:8080/helloworld
    | Application loaded in interactive mode. Type 'stop-app' to shutdown.
    | Downloading: plugins-list.xml
You can debug a grails app by simply right-clicking on the `Application.groovy` class in your IDE and choosing the appropriate action (since Grails 3). Alternatively, you can run your app with the following command and then attach a remote debugger to it.
    grails -debug-jvm run-app
More information on the run-app command can be found in the reference guide. | Quick Reference (hide)