简体   繁体   English

在IntelliJ中调试生成的Java类

[英]Debugging generated java classes in IntelliJ

I'm working on a project that is generating classes at runtime https://github.com/SpongePowered/SpongeAPI 我正在研究一个在运行时生成类的项目https://github.com/SpongePowered/SpongeAPI

Is it possible to debug the classes it generates at runtime with IntelliJ even though there are no, (incorrect) or multiple sources attached for the class? 即使没有,(不正确)或为该类附加多个源,也可以使用IntelliJ调试在运行时生成的类吗?

For the classes that have partial sources I've tried debugging them, but all I end up stepping through is the incomplete sources if they exist. 对于具有部分源代码的类,我已经尝试调试它们,但是最终我逐步了解的是不完整的源代码(如果存在)。 Is there a way to navigate the classes and view the decompiled sources while debugging? 有没有一种方法可以在调试时浏览类并查看反编译的源代码?

If the library you are using has support for dumping the class files or source to disk, it should be possible to add the directory as a provided dependency to the module you are debugging. 如果您使用的库支持将类文件或源转储到磁盘,则应该可以将目录作为提供的依赖项添加到要调试的模块中。

https://intellij-support.jetbrains.com/hc/en-us/community/posts/206152289-Is-it-possible-to-debug-compiled-classes-instead-of-the-source- https://intellij-support.jetbrains.com/hc/en-us/community/posts/206152289-Is-it-possible-to-debug-compiled-classes-instead-of-the-source-

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

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