开发者

How to constrain IntelliJ to lookup the debugging source files to the current module?

I have an Intellij Project with several Java modules, including different branches of the same projects, such that a particular class may be defined in more than one IntelliJ module. When I debug on开发者_开发百科e of the modules (using for instance Maven Jetty plugin) IntelliJ will open source files from other modules (apparently the first one from its index).

Is it possible to restrict the source lookup context or classpath to the current module?


You should specify the correct module in the Run/Debug configuration, IDEA will use classpath of this module for debugging. However, if multiple copies of a same class are present in this module via its dependencies, there is nothing you can do except re-configuring your project so that one module doesn't have multiple class copies in its dependencies.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜