简体   繁体   English

使用Eclipse进行GWT客户端调试

[英]GWT client debugging with Eclipse

I have a GWT application which i need to debug the both client java classes (GWT) and server business classes. 我有一个GWT应用程序,我需要调试客户端Java类(GWT)和服务器业务类。 I can successfully debug the server side classes where the debug point hits when ever a service request process. 我可以成功调试服务器端类,当有服务请求过程时,调试点就会到达该服务器端类。

But the problem is in client java classes non of the debug points are hit. 但是问题出在客户端Java类中,没有调试点被命中。 What is the reason for it? 是什么原因呢? Do i need to have further steps or tool in order to debug the GWT java classes? 我需要其他步骤或工具来调试GWT Java类吗?

I am using eclipse indigo and glassfish. 我正在使用蚀靛蓝和玻璃鱼。

if you want to debug the code in development mode you have to add the query parameter to the url. 如果要在开发模式下调试代码, 则必须将 查询参数 添加 到url中。

Launching your hostpage may be in Two ways. 启动主页的方式有两种。

If you are launching your host page ( appName.html ) directly from IDE (eclipse): 如果直接从IDE (eclipse) 启动host pageappName.html ):

Url in browser should be 浏览器中的网址应为

http://localhost:8080/index.html?gwt.codesvr=127.0.0.1:9997

------^---------|appname.html?--------^---------

1st part is local host 第一部分是local host

2nd part is your host page 第二部分是您的主机页面

3rd part is debug query parameter. 第三部分是调试查询参数。

If you are dispatching the page from servlet: 如果要从servlet调度页面:

request.getRequestDispatcher("/appName.html?gwt.codesvr=127.0.0.1:9997")
                                                    .forward(request, response);

And check your debug cofiguration Arguments tab. 并检查您的调试配置参数选项卡。

-remoteUI "${gwt_remote_ui_server_port}:${unique_id}" 
-startupUrl projectname.html -logLevel INFO 
-codeServerPort 9997 -port 8888 -war
E:\workspace\ProjectName\war com.test.Projectname

Refer the link for the full setup . 有关完整设置,请参阅链接。

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

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