I'm developing a simple GWT application with eclipse. When I try to run it, it runs in development mode. How I can change its configuration and disable running in development mode?
From eclipse, choose the google tools icon from the toolbar, and then click the red toolbox to compile the code.
When it's compiled, run the project as normal. From this point, you can either run in development mode by including the gwt.codesvr=localhost:9997 argument on the url, or you can run in production mode by omitting the gwt.codesvr argument.
To be more concise: to run in production mode, just remove the gwt.codesvr argument from the url. If you get the error that your module "may need to be recompiled," go back to eclipse and choose the red toolbox icon to compile the code again.
I think you don't want to disable anything. Instead of running the application as a gwt application deploy the application in tomcat or some other servers. Then it will run as normal web application. Gwt application also a dynamic web project. Nothing extra in it.
From the question I am not able to identify whether you are using any build tool or not. Just incase if you are using maven build tool you have option to maven jetty plugin and execute the mvn jetty:run option.
Related
I have a GWT-Maven project and I want to debug it. I have not any Idea about debug in development mode or production mode. so I am giving some step which I did.
I deploy the war file on tomcat6 liferay server.
now I set a break point on server side(its work perfect)
when I set break point on client its not workig.
so is there is any way to debug GWT client on development or production mode.
I'm not sure if I'm following you correctly, but GWT is compiled into JS. Take a look at sourceMaps, I believe that's what you're looking for.
You should use the debugger of your browser. Chrome is best for this.
Launch your GWT app.
Press F12 to open developer tools.
Select "sources" tab
In the tree on the left open "Title of your page (xxxx.html)"
Below this you will see source maps with all your packages.
Open the java file you wish to put a breakpoint in and set a breakpoint using Chrome.
Doing client side GWT debugging in Eclipse is afaik not possible. But for me the Chrome debugger is more than enough.
I think IntelliJ can do client side debugging for GWT from whitin IntelliJ itself (for the paid version of IntelliJ).
Trying to build my application using using MVN Install cmd no build errors. Can one ahead and start the jboss server in eclipse ID? Will one be able to see all the changes getting affected with out ECLIPSE->Build ALL ?? Trying because my eclipse build takes lot of time and it validates the target folder as well as a result build is very slow. So to avoid this one can do MVN Install and run my server in debug will one be able to see my changes getting built?
If you are building project from Maven and starting server. It has no impact from eclipse changes.
If you are running server in debug mode and you are doing "Remote Debug" in eclipse then changes in eclipse will be effective as debug mode changes.
I have followed the steps given on this page - getting-started-with-the-superdevmode
but I am still getting message - Can't find any GWT Modules on this page. I did some more googling but could not find any solution until now.
I am using GWT 2.6.1 and eclipse kepler 64 bit on ubuntu.
Here are the steps I did.
Created a new Web app project for GAE, using GWT 2.6.1 and GAE sdk 1.9.6.
Go to Run configurations. Create a new configuration for a "Java Application". Change the main class, Argument and add jar file as shown in the screenshot.
Check the apps .gwt.xml file. It already has <add-linker name="xsiframe"/>. I have tried adding devModeRedirectEnabled property also. It did not help.
GWT compile the project.
Run the application as Web application. Default jetty config serves the application at
http://localhost:8888/SuperDev.html.
I opened up this page in firefox. I can see the page content.
Launch the Java application configuration. It does compile again and gives a success message and tells me to launch
http://localhost:9876/
I opened it in firefox and it shows -
Dragged Dev Mode On to firefox's bookmark. And clicked.
I get the message - Can't find any GWT Modules on this page.
Following are the configurations for my superdev mode java app. Did I miss anything?
You need to click the bookmarklet when viewing your compiled web app.
The last steps should therefore be:
Dragged Dev Mode On to firefox's bookmark.
Switched back to my application at http://localhost:8888/SuperDev.html and clicked the bookmark
Once you have the bookmarklets, you actually don't really need to open http://localhost:9876 anymore (you'll find compile logs there, and can browser your code, including the code generated by GWT generators; so it can still be useful).
I tried to do it with Eclipse Oxygen, Java7 (for run application, for oxygen you have to have java 8), and GWT Eclipse Plugin 3.0.0.
In such an environment all you need to do is:
On project right click > Debug As > GWT Legacy Development Mode with Jetty.
PS:
you have to have address like this
http://127.0.0.1:8888/StockWatcher.html?gwt.codesvr=127.0.0.1:9997
NOT like :http://127.0.0.1:8888/StockWatcher.html
After openning addres you must additionally install the plugin in the browser - you will be asked for it
It work on IE11
I come from a background in C++, Python, and Django and I'm trying to expand my horizons and learn Scala and Lift. However, I'm having a really hard time figuring out how to debug Lift applications using eclipse.
I can create projects using some of the lift sbt templates and run them no problem. However, I haven't been able to start the application from within Eclipse because it can't find Jetty, and as a result, I'm not able to use the debugger to step through the Lift code. Weeks of googling haven't helped much.
Could someone share their methods or suggestions? I'm also new to the jvm, so feel free to share best practices or point out important differences that I may be missing.
Ok, I've gotten this figured out.
So I'm not actually launching the application from the Eclipse debugger. I'm starting the application through sbt, and then connecting the Eclipse remote debugger to the sbt vm that's running the webapp.
Here's what I did:
Assuming you have sbt-launch.jar in /bin:
Create the file /bin/sbt_debug with permission to execute and containing this line:
java -Xmx512M -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -jar /bin/sbt-launch.jar "$#"
What this script is doing is starting sbt and instructing the jvm to allow debugging on port 5005
Go to your lift project directory in your terminal and enter sbt_debug. Once you're in the sbt console enter container:start / container:update or ~jetty:start / ~jetty:update depending on which version of sbt you're using.
Next go to Eclipse, click the debug icon and select "Debug Configurations..."
On the left column, click "Remote Java Application" and create a new debug configuration. Set the Port to 5005.
Hit the Debug button and the Eclipse debugger should now be debugging the sbt process you started earlier
Note: This is the first method that has worked for me. If you have one that is better, please share
I've found the most useful tools to be the SBT Eclipse Plugin and the RunJettyRun plugin for Eclipse. The former will allow you to generate Eclipse config files based on your SBT setup and the latter will launch Jetty from Eclipse with the debugger attached. An added bonus is that generating your Eclipse config using "eclipse with-source=true" from the SBT prompt will download and attach src jars as well so you can step through Lift and any other 3rd party libraries you depend on as well as your own code.
Does anyone know if it's possible in Eclipse, to execute a script/function/anything right before launching my app in debug? There only seems to be a few options - after clean, during a clean, during manual builds, during auto-builds
I want to execute an external tool (rsync) so I can make sure my assets are up to date before running.
Cheers,
Shane
Eclipse CDT provides special launch configuration type (Launch Group), which you can use to group several launch configurations (included External Tools) to be executed either sequentially, parallel or mixed. The drawback is that you need to have CDT installed in your Eclipse.
Update: There is similar question, which deals with launching multiple launch configurations.
If you want to add the "Launch Group" feature onto an existing, not necessarily CDT, eclipse install, you can install just the plugin called "C/C++ Remote Launch". (org.eclipse.cdt.launch.remote) - it is not C/C++ specific.