无法将 jdb 连接到 Maven 测试调试会话
我正在使用 maven 调试测试:
mvnDebug test
Maven 说调试服务器正在端口 8000 上运行,因此我尝试将 jdb 调试会话附加到它:
jdb -sourcepath ./src/main/java/:./src/test/java/ -attach 8000
这里出现了许多问题。
- 即使设置断点并运行后,我也无法查看任何源文件。
- 当测试运行时,它似乎完全忽略我设置的任何断点,就好像 jdb 找不到我所指的类一样。
任何想法为什么会这样?我还可以在 eclipse 中调试我的项目,我只是无法将 jdb 连接到我的项目。
I'm debugging a test using maven:
mvnDebug test
Maven says the debug server is running at port 8000, so I try to attach a jdb debug session to it:
jdb -sourcepath ./src/main/java/:./src/test/java/ -attach 8000
A number of problems arise here.
- I cannot view any of my source files, even after setting breakpoints and running.
- When the test runs, it seems to completely ignore any breakpoints I set, as if jdb couldn't find the class I was referring to.
Any ideas why this could be? I can also debug my project in eclipse, I just cannot attach jdb to my project.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论