简体   繁体   English

在Eclipse GWT中进行调试

[英]Debugging in Eclipse GWT

Since yesterday I've been working on an existing GWT project. 从昨天开始,我一直致力于现有的GWT项目。 My problem however is that I can't debug in Eclipse. 但问题是我无法在Eclipse中调试。 It simply won't break in my breakpoints. 它根本不会破坏我的断点。

I've seen other people with the same issue: 我见过其他人有同样的问题:

And I've also looked at some tutorials: 我还看了一些教程:

I've tried all kind of different things based on these sites, but none of them seem to work. 我已经根据这些网站尝试了各种不同的东西,但它们似乎都没有效果。 Some things I've tried: 我试过的一些事情:

  • using FireFox instead of Google Chrome 使用FireFox而不是谷歌浏览器
  • using jdk1.8.0_72 instead of jdk1.7.0_79 使用jdk1.8.0_72而不是jdk1.7.0_79
  • putting gwt-dev-2.7.0.jar at the top of my Classpath User Entries (instead of somewhere in the middle) gwt-dev-2.7.0.jar放在我的Classpath用户条目的顶部(而不是在中间的某个地方)
  • Adding any combination of the following Arguments: -bindAdres my.ip.adres ; 添加以下参数的任意组合: -bindAdres my.ip.adres ; -gen my_path ; -gen my_path ; -eclipse ( -eclipse isn't a valid argument btw..). -eclipse-eclipse不是一个有效的参数btw ..)。

My current configurations: 我目前的配置:

Main-tab: 主要标签:

Project:
    user-testwar
Main class:
    com.google.gwt.dev.DevMode

Arguments-tab: 参数标签:

Program arguments:
    -logLevel INFO
    -port 8888
    -war C:\Users\...\user-testwar\target\UserTestWar
    -superDevMode
    -remoteUI "${gwt_remote_ui_server_port}:${unique_id}"
    -codeServerPort 9997
    my.package.gwt.udf.viewer.TestWarProject
VM arguments:
    -Xmx512m

Classpath-tab: 的Classpath选项卡:

Bootstrap Entries:
    JRE System Library [JavaSE-1.6]
User Entries:
    gwt-dev-2.7.0.jar
    java - \user-testwar\src\main\
    gwt - \user-testwar\target\generated-sources\
    java - \user-jar\src\main\
    gwt - \user-jar\target\generated-sources\
  > user-testwar (default classpath)
        user-testwar
        Maven Dependencies
        gwt-user.jar
        gwt-codeserver.jar
        gwt-dev.jar
        validation-api-1.0.0.GA-sources.jar
        validation-api-1.0.0.GA.jar

So, anyone has any (other) ideas to fix the debug issues with Eclipse and GWT? 那么,任何人都有任何(其他)想法来修复Eclipse和GWT的调试问题?

EDIT: 编辑:

When I put a breakpoint in our RemoteService implementation class it does break there. 当我在我们的RemoteService实现类中放置一个断点时,它会在那里中断。 But the breakpoints of my widgets / pages in the user-jar project and in the main code of my user-testwar project (where I want to debug) are ignored.. 但是我的用户jar项目中的小部件/页面和我的user-testwar项目(我要调试的地方)的主要代码中的断点被忽略了。

If you want to debug your GWT application in Eclipse and you are using SDM, you need the SBDG plugin. 如果要在Eclipse中调试GWT应用程序并使用SDM,则需要SBDG插件。

The SDBG-plugin can be downloaded here: https://sdbg.github.io/ SDBG插件可以在这里下载: https//sdbg.github.io/

Otherwise, when using SDM, you have to debug in the browser. 否则,使用SDM时,必须在浏览器中进行调试。

Another solution is to use Intellij Ultimate edition, which offers a JavaScript debugger. 另一个解决方案是使用Intellij Ultimate版本,它提供了一个JavaScript调试器。 You need the Ultimate edition in Fact that the GWT facet is not part of the Community edition. 事实上,你需要终极版,GWT方面不是社区版的一部分。

Update: 更新:

Starting with version 3.0 of the GWT Eclipse plugin, the SBDG-Plugin is integrated into the GWT plugin and makes it quite easy to debug a GWT application. 从GWT Eclipse插件的3.0版开始,SBDG-Plugin被集成到GWT插件中,使调试GWT应用程序变得非常容易。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM