Remotely debugging Grails/SmartGWT from Eclipse
Thanks a million for the step-by-step!
Here's my 2 cents; assume Windows and the setup specified in this thread to date:
Edit %HOMEPATH%\.grails\%GRAILS_VERSION%\projects\%PROJECT_NAME%\plugins\gwt-%GRAILS_GWT_PLUGIN_VERSION%\scripts\RunGwtClient.groovy such that:
becomes:
Import your Grails/SmartGWT project into Eclipse and create a Debug launch config
Launch the GWTShell in debug-able mode with: grails run-gwt-client from the command-line or just: run-gwt-client if you've got Eclipse's Grails plugin installed.
Now, attach the Eclipse debugger to the GWTShell and manipulate your Grails/SmartGWT application with the GWTBrowser (only) hitting Eclipse'd breakpoints as you go.
Change the port (i.e. 1044) as you wish.
Of course, every time you run that Grails target i.e. run-gwt-client you'll be launching in debug-able mode; a smoother way to flag your intention to debug awaits your Groovy skills.
P.S. GWTShell always launches the browser to port 8080/%GRAILS_APP_NAME% e.g. http://localhost:8000/test but what actually works is: port 8888/%SMART_GWT_MODULE_NAME% e.g. http://localhost:8888/helloworld
You can instead specify: grails run-gwt-client localhost:8888 as a starting point to exploring your SmartGWT app
Thanks a million for the step-by-step!
Here's my 2 cents; assume Windows and the setup specified in this thread to date:
Edit %HOMEPATH%\.grails\%GRAILS_VERSION%\projects\%PROJECT_NAME%\plugins\gwt-%GRAILS_GWT_PLUGIN_VERSION%\scripts\RunGwtClient.groovy such that:
Code:
gwtRun('com.google.gwt.dev.GWTShell') { // Hosted mode requires a special JVM argument on Mac OS X. if (antProject.properties.'os.name' == 'Mac OS X') { jvmarg(value: '-XstartOnFirstThread') } arg(value: "-out") arg(value: gwtOutputPath) arg(value: "http://${targetServer}/${grailsAppName}") }
Code:
gwtRun('com.google.gwt.dev.GWTShell') { // Hosted mode requires a special JVM argument on Mac OS X. if (antProject.properties.'os.name' == 'Mac OS X') { jvmarg(value: '-XstartOnFirstThread') } jvmarg(value: '-Xdebug') jvmarg(value: '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=1044') arg(value: "-out") arg(value: gwtOutputPath) arg(value: "http://${targetServer}/${grailsAppName}") }
Launch the GWTShell in debug-able mode with: grails run-gwt-client from the command-line or just: run-gwt-client if you've got Eclipse's Grails plugin installed.
Now, attach the Eclipse debugger to the GWTShell and manipulate your Grails/SmartGWT application with the GWTBrowser (only) hitting Eclipse'd breakpoints as you go.
Change the port (i.e. 1044) as you wish.
Of course, every time you run that Grails target i.e. run-gwt-client you'll be launching in debug-able mode; a smoother way to flag your intention to debug awaits your Groovy skills.
P.S. GWTShell always launches the browser to port 8080/%GRAILS_APP_NAME% e.g. http://localhost:8000/test but what actually works is: port 8888/%SMART_GWT_MODULE_NAME% e.g. http://localhost:8888/helloworld
You can instead specify: grails run-gwt-client localhost:8888 as a starting point to exploring your SmartGWT app
Comment