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

前端 未结 10 1610
一向
一向 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:30

    These days, it seems that GWT classic dev mode is no longer supported, or at least not recommended. It's been replaced by GWT super dev mode, which runs your code in Javascript, not on the JVM. This means that you debug in your browser, instead of in Eclipse. For example, I visited my site in Chrome, opened the developer tools, switched to the sources tab, and then looked under the sourcemaps folder to find all my Java classes. I can put breakpoints there, and the browser will stop when the Javascript equivalent is running. I can inspect the Javascript variables that roughly match my Java variables.

    If you really prefer debugging in Eclipse, you can use the Super Dev Mode Debugger Eclipse plugin, but it's doing the same thing as the Chrome debugger. When I tried it out, I had to watch the video to get it working.

    0 讨论(0)
  • 2020-12-06 05:32

    I want to confirm that Basically, JDK 1.6.0_14 will not work with GWT in eclipse debug mode. Switching a different JDK will work.

    I installed JDK 1.6.0_13 and the eclipse debug perspective kicked in. Using eclipse 3.3.2

    Thanks for the tip!

    0 讨论(0)
  • 2020-12-06 05:34

    I was also following the StockWatcher guide on the GWT website and then got to the Debugging part of the tutorial and I could not get my breakpoints to trigger until I stumbled upon the SDBG plugin. I installed the plugin and followed the video and it worked!

    My environment:

    • Eclipse Neon.1a Release (4.6.1)
    • JDK 1.7.0_80
    • GWT SDK 2.7.0

    Additional Notes:

    Make sure to make a Debug Configuration and use com.google.gwt.dev.DevMode as your Main class.

    0 讨论(0)
  • 2020-12-06 05:36

    I had the same problem. In my case the problem was that I was using JRE instead of JDK. Setting JDK instead of JRE, solved my problem. I recommend reviewing the build configuration to see which one is being used.

    0 讨论(0)
  • 2020-12-06 05:40

    Upgraded to jdk1.6.0_17 - Works fine

    0 讨论(0)
  • 2020-12-06 05:42

    Also confirming that the debugger does not work with 1.6.0_14. A downgrade to 1.6.0_13 solved my issue. Farinha, might you still have your java_home (or something similar) pointing to an install of 1.6.0_14 even though you have installed 1.6.0_13?

    0 讨论(0)
提交回复
热议问题