components/grails/files/grails-debug
changeset 413 1a6d7a739179
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/grails/files/grails-debug	Mon Jul 18 10:13:30 2011 -0700
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+if [ -z "$GRAILS_HOME" ]; then
+    echo "Please set GRAILS_HOME environment variable to location, where Grails is installed." 1>&2
+    echo "(Default location is /usr/grails/[version], e.g. /usr/grails/1.0.3)" 1>&2
+    exit 1
+fi
+
+if [ ! -f "$GRAILS_HOME/bin/startGrails" ]; then
+    echo "GRAILS_HOME is not set properly: $GRAILS_HOME" 1>&2
+    echo "It must contain path to the directory where Grails is installed!" 1>&2
+    exit 1
+fi
+
+. "$GRAILS_HOME/bin/startGrails"
+
+JAVA_OPTS="-Xdebug -Xnoagent -Dgrails.full.stacktrace=true -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
+
+startGrails org.codehaus.groovy.grails.cli.GrailsScriptRunner "$@"
+