I am using gwt 2.6.0 to develop web application. Using super dev mode to run my application in development mode.
I could not understand how to use break point in super dev mode so that i can debug my code step by step (line by line).
This is JavaScript, so you use JS dev tools. And it has source maps (make sure to turn it on in your dev tool if not already), so you can actually see, set breakpoints in, and debug step by step in your Java code.
Some IDEs have integrations too, IntelliJ IDEA Ultimate can connect to Chrome or Firefox and supports source maps so you can debug right from the IDE. In Eclipse, you'd need the SDBG plugin, and it only supports Chrome remote debugging protocol.
The one thing you'll likely miss is variable inspection (watch, etc.).
Related
I have headache with GWT debugging in Intellij IDEA.
GWT version is 2.8.1 and Intellij IDEA 2018.2.
My application is server side with gwt. I setted GWT configuration and when I start server and separetely GWT, debug works but as javascript debug instead java, names and values of variables uncommon and not convenient for java.
Maybe someone meeted with similar problem and could say what I can resolve it?
This my GWT Configuration.
GWT 2.8 uses Super Dev Mode to run client code, and it compiles Java code to Javascript, similar to production mode, see GWT docs for details. So you need to use Javascript debugger to debug the code.
It would be nice if, once new code is tested, I could release changes to either a particular subdomain of my GAE app (such as demo.my-gae-app.com instead of my live environment at my-gae-app.com) or a particular backend instance (if subdomains are prohibited or not the right solution here).
Then, I can demo new code changes to my beta testers, and run performance tests against a real-life GAE environment. I know that the GAE SDK comes with a dev appserver, but it stubs most of the API calls, and doesn't handle scaling at all like a production environment would. And although we will absolutely use it for developers' local sandboxes as well as our QA environment, I just don't feel right release code into prod that hasn't ran against an environment that really mimics production.
How do other GAE developers/teams deal with this? I'm really just looking to have a pre-production environment (like "Demo")...but actually on live GAE app servers. Of course, I need to restrict access to this code so that only myself, my developers, my beta testers and our automated perf tests can access it... (that's the kicker).
You can deploy your code to a non-default application version, either by:
changing the version tag value in appengine-web.xml
calling appcfg.sh with -V version argument
changing the version in the deploy options of Google Eclipse plugin
After doing so, you can access your application by visiting version.appid.appspot.com
Note that different versions can access the same application datastore.
I registered a new application in Google app engine and deployed the beta version to it by changing project 's settings in eclipse. Then using google's tools (see Google doc) I copied the production datastore's content to the new beta app.
datastore in read-only mode while extracting data
Entity Keys could be problematic when working with unowned relationships - does anyone have information about this?
This provides me a perfect beta live environment.
I understand that Google's plugin for Eclipse tries to emphasize the "code-test-debug" cycle and make it as quick as possible, and that it comes with a medley of tools for doing just this.
What I don't understand is the need for a "developer" browser plugin for running your app inside Eclipse and testing locally on localhost. Why can't the plugin just start an embedded webserver and host it from there? Why does the browser require this plugin in the first place?
Tangential to that is the question of how it relates to development mode in general. Is Eclipse running in some kind of "special configuration" when in development mode that lets it talk with this browser plugin under the hood? If so, why is this necessary? Thanks in advance!
I believe you mixed two separate things here: GWT and GAE. GAE does not require browser plugin to run local dev server, while GWT requires browser plugin to run local dev mode (and even this is going away with 2.5 super devmode).
The confusion comes from the fact that Google bundles this two separate technologies into one plugin bundle, the GPE.
To avoid this just uncheck GWT when creating new GAE app.
Edit:
GWT dev plugin is only needed during dev mode. In this mode GWT Java source is not translated to javascript, but actually running in JVM as Java. This is needed to support debugging: https://developers.google.com/web-toolkit/doc/latest/DevGuideCompilingAndDebugging#DevGuideDevMode
Edit 2:
If you do not like the browser plugin, then you can use production mode on your local server. The downside to this is that compile-run will be greatly extended, since devmode compiles in-place: you can simply change GWT code and see changes by simply reloading browser window.
I'm quite new to develop on GAE. Need just sort out few questions about setting up development.
I'm currently using Eclipse 3.7.x, Google Suite Plugin 2.5.2 r37
Related links I found:
http://code.google.com/p/googleappengine/issues/detail?id=1787
GAE - Development server in Eclipse doesn't update?
http://code.google.com/p/gae-wtp-plugin/
I came from standard LAMP development environment. Changes are propagated immediately to development server (usually localhost) and I can control deployment of application to production server through DCVS/SVN and attached handlers updating remote codebase.
I'd expect Google Plugin allowing us to do the same. Necessary functions I (probably) need:
On-Save handler to recompile and update development code
Production like development environment (for testing in almost-real conditions)
Deployment to production environment
The last one is simply using DCVS/SVN to tag code and save the trunk branch, and using Google > Deploy to App Engine option to push it to remote server.
But how can I solve the first two requirements? Do I really need them, or is it only my hangover from web development, and development process in GAE works differently?
If the first one is solvable through GAE WTP Plugin, can you please more elaborate on how to setup development with this plugin, as I was not able to achieve anything more, than server, which has to be restarted in the same manner as Google Plugin default GAE development server
does.
You can update development code pretty quickly with the yellow reload button. For me, with about 100 server classes, this takes 2-5 seconds.
The development environment is reasonably good - you can simulate HRD and stuff like that. Of course, it's not actually a distributed cloud environment - we do most testing on local servers, and then have a whole test app on the cloud for a last round of simulation. Of course, some things change when 1000 people are accessing it at once, but I don't know how to get around that.
You can find the reload button on the Development View pane:
We have a vast Documentum application which I have deployed in Tomcat. The code is being maintained and compiled in Eclipse IDE.
It is very hard to track where and what data is going through which code, I have a decompiler plugin to help with this task, but it does not work with most of my code as the classes are without a main method. These classes cannot be decompiled by the plugin.
Is there any method to overcome this? So that I can see the flow of data from JSP to backend class to repository, and vise versa.
Sure. You can either connect to tomcat using remote debugging (see here) or run tomcat into eclipse itself. You need appropriate plug-in for this but typically standard eclipse distributions for server side development already have one. Open Servers view, create new server, follow the wizard and you will be done in a minute.
JPDA is a java standard tool.
It is designed for use by debuggers in any environment on any java application.
For details you can look at
http://www.ibm.com/developerworks/opensource/library/os-eclipse-javadebug/index.html
http://www.ibm.com/developerworks/library/os-ecbug/
The 1st link gives a detailed view with screen shots of remote debugging using eclipse.