简体   繁体   English

是否可以使用GPE调试GWT项目服务器端代码(服务器端代码打包为jar)

[英]Is it possible to debug GWT project server side code using GPE(server side code been packaged as a jar)

I have a GWT application which i can debug the server side using GPE easy when the server and client located at same project, now i remove server side code and package it as jar, add it as project dependency, Seem there is no way to debug server side code anymore, Any ideas? 我有一个GWT应用程序,当服务器和客户端位于同一项目时,我可以使用GPE轻松调试服务器端,现在我删除服务器端代码并​​将其打包为jar,添加为项目依赖项,似乎没有办法调试服务器端代码了,有什么想法吗? By the way i'm using Maven to organize my project. 顺便说一下,我正在使用Maven来组织我的项目。 Thanks 谢谢

Edit: by debugging i mean it can stop at breakpoint 编辑:通过调试,我的意思是它可以在断点处停止

At Eclipse, build path config, when you include the jar, you are also allowed to associate the source path for that jar. 在Eclipse中,构建路径配置,当您包含jar时,还可以关联该jar的源路径。 That source would then be traversable during debugging. 然后,该源将在调试期间可遍历。

Your server side certainly used a number of libraries, where the dependency is specified thro Maven. 您的服务器端肯定使用了许多库,其中的依赖关系是通过Maven指定的。 Maven plugin for eclipse spontaneously pulls in the source when your debugging traverses thro a maven supplied library. 当调试遍历Maven提供的库时,用于Eclipse的Maven插件会自发获取源代码。 Provided that the library supplier had been compliant to maven artefact directory structure. 前提是图书馆供应商已遵守Maven人工制品目录结构。

You can also mavenise your jar. 您也可以将罐子捣碎。 You simply place your jar, source, pom, etc into the maven artefact directory structure. 您只需将jar,source,pom等放入maven artefact目录结构中。 And then in maven include that path as a repository. 然后在Maven中将该路径作为存储库。 In fact, you can create a quick-and-dirty maven repo on google code doing it that way. 实际上,您可以通过这种方式在Google代码上创建一个快捷的Maven存储库。

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

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