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

前端 未结 10 1609
一向
一向 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.

提交回复
热议问题