I would like to debug web application of my university mate because I am developing android application that it will interact with the web application.
I am using "debug" perspective and with andorid or normal Java application I don't have problem.. but with the web application I can't debug .. I put breackpoints and "debug as web application" in debug perspective... but it doesn't work...
It's my console
Initializing App Engine server
30-dic-2012 20.06.21 com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
30-dic-2012 20.06.33 com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed C:\Users\alfo888_ibg\workspace\TablePlus\war\WEB-INF/appengine-web.xml
30-dic-2012 20.06.34 com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed C:\Users\alfo888_ibg\workspace\TablePlus\war\WEB-INF/web.xml
30-dic-2012 20.06.44 com.google.apphosting.utils.jetty.JettyLogger info
INFO: jetty-6.1.x
30-dic-2012 20.06.48 com.google.appengine.api.datastore.dev.LocalDatastoreService init
INFO: Local Datastore initialized:
Type: High Replication
Storage: C:\Users\alfo888_ibg\workspace\TablePlus\war\WEB-INF\appengine-generated\local_db.bin
30-dic-2012 20.06.49 com.google.appengine.api.datastore.dev.LocalDatastoreService load
INFO: Time to load datastore: 297 ms
30-dic-2012 20.06.53 com.google.apphosting.utils.jetty.JettyLogger info
INFO: Started SelectChannelConnector@0.0.0.0:8888
30-dic-2012 20.06.53 com.google.appengine.tools.development.DevAppServerImpl start
INFO: The server is running at localhost:8888
30-dic-2012 20.06.53 com.google.appengine.tools.development.DevAppServerImpl start
INFO: The admin console is running at localhost:8888/_ah/admin
The above solution looks good, but will also need to attach to the server from the debugger through a JPDA port (ex. on setting it up via runtime arguments on port 4000 below).
For example.. before running your web application on Tomcat or Jetty, you need to set your java opts:
If you run your web application via the console you can do something like:
If you are running your application on Tomcat then you can these instructions of the "Java" tab in your tomcat config. (see image below)
Java options:
Then from the IDE you can run the debugger to debug the target VM on port 4000. (like in screenshot below)
This page shows you a little more in detail how to do it:
http://www.eclipsezone.com/eclipse/forums/t53459.html
Altough I have not worked with appengine.
To local debug a gwt application i do the following procedure
Create a new java remote webapplication as example:
now your breakpoints should be reached.
You should start the web application with the debug flag. In Tomcat you must set the flag
jpda
and restart. In Jetty should be similar.The problem has been discussed at length, and the new version of appengine-maven-plugin 1.7.5-SNAPSHOT has just been released and allows for setting arguments in order to remote debug the application.
antony explains how to do that here