IDEA 14.1.1 debugger using decompiled code instead of source code

Hi!

I'm using IDE 14.1.1 on Linux.
In my project I have four modules: one is ant based and three are maven based.
One of those maven based is a JEE application with several modules. When I try to debug a file from one maven module and step into a method that is part of a class in another maven module then IDEA decompiles this second class and steps on this decompiled code instead of using the source code. All source code is in IDEA project.

Why is this?

Best regards,
    Kovi

6 comments
Comment actions Permalink

Make sure to use module dependencies (so that one module depends on another, not on jar produced by another module): http://www.jetbrains.com/idea/webhelp/configuring-module-dependencies-and-libraries.html .

In case you configure dependencies on jars, IDEA will decompile the code from these jars unless there is source code attached to them, but it's really a bad idea to attach your project source roots to the jars, it will just add more problems.

0
Comment actions Permalink

I've gone over the whole project and I always use modules for dependencies. I never changes these settings, they are as Import from maven project made them.
The Dependencies tab under "Project Structure" and "Modules" reflects what I have in pom.
And this worked properly in IDEA 14.0.3.

Is there something more I can check?

0
Comment actions Permalink

Please file a bug at http://youtrack.jetbrains.com/issues/IDEA with a sample project to reproduce.

0
Comment actions Permalink

I've found what the problem was.
In the same project I also have a module that is ant based and has dependency specified as a JAR directory containing the same jar files as my maven based module.
When I remove this module everything is OK.

I just don't know how to create a smaller project that would reflect this problem.

Any ideas?

0
Comment actions Permalink

Revise module dependencies so that this module depends on another module instead of the jars produced by that module.

0
Comment actions Permalink

Hi!

I've put jars into seperate library and add the library as the module dependancy.
From the library I have removed the jars that are a result of a maven module build.
Then I added this maven modules as dependencies to the ant based module.

Now when I debug the maven module, debugger uses source from maven modules instead of decompiling classes from jars.

Nice. Thanks for your help.

0

Please sign in to leave a comment.