Why when starting GWT in debug mode, my break points don't break

前端 未结 10 1653
一向
一向 2020-12-06 05:08

I am using Eclipse 3.4.2 with the latest GWT. The IDE doesn\'t even switch to Debug Perspective automatically.

10条回答
  •  误落风尘
    2020-12-06 05:43

    Do you launch your GWT application in hosted mode ?

    You will spend most of your development time running your application in hosted mode, which means that you are interacting with your GWT application without it having been translated into JavaScript.
    Anytime you edit, run, and debug applications from a Java integrated development environment (IDE), you are working in hosted mode.
    When an application is running in hosted mode, the Java Virtual Machine (JVM) is actually executing the application code as compiled Java bytecode, using GWT plumbing to automate an embedded browser window.
    This means that the debugging facilities of your IDE are available to debug both your client-side GWT code and any server-side Java code as well.


    Tip: If you are using Eclipse, you can also create a launch configuration file when creating a new project with applicationCreator by using the -eclipse flag.

    If you didn't use applicationCreator to create an application-specific hosted mode shell script, you can manually run the main class in com.google.gwt.dev.GWTShell found (depending on your OS) in gwt-dev-windows.jar, gwt-dev-linux.jar, or gwt-dev-mac.jar.

    Important: If you are not using the generated -shell script, be aware that in hosted mode, the GWT development shell looks for modules (and therefore client-side source) using the JVM's classpath. Make sure to add your source directories first in your classpath.


    See also Debug in Hosted Mode

    alt text http://google-web-toolkit-doc-1-5.googlecode.com/svn/wiki/StockWatcherDebug1.png

提交回复
热议问题