Is it possible to debug GWT client code on a REMOTE server using IntelliJ 9 Community Edition?

前端 未结 2 1088
Happy的楠姐
Happy的楠姐 2020-12-13 14:47

I\'m trying to move our Google Web Toolkit (GWT) development from Eclipse to IntelliJ 9 Community edition. So far I\'ve been able to run and debug client/server code success

2条回答
  •  南方客
    南方客 (楼主)
    2020-12-13 15:23

    I was finally able to accomplish this by using GWT's DevMode class, as described in the documentation.

    In short -

    • Add your project to IntelliJ 9 Community edition
    • Add an Application run/debug configuration
    • Use com.google.gwt.dev.DevMode as your main class (make sure to include gwt-user and gwt-dev jars to the project classpath. See here)
    • Add the following program parameters:

      -noserver -war "[full path to your exploded war]" -gen "[full path to generated files]" -logLevel INFO -port [remote server port] -startupUrl "[URL of the remote page]" [com.company.YourEntryPoint]

    This way, the DevMode runner will not instantiate the built in container and will allow your remote server's JavaScript to be debugged in its original Java form.

    Note that for builds that don't require debugging remote client code you may use Maven or Ant integration, which is much simpler. I don't have any experience with the webAppCreator generated build.xml, but with Maven you could simply run the gwt:run or gwt:debug goals with this parameter: -DrunTarget=

    Hope it helps!

提交回复
热议问题