Odd behaviour of debugger: jumping into .class file instead of .java

Project X has modules Y,Z

Module Y depends on a jarred version of Z

Now, I have a test case for a class WW belonging to Z, and the test case is in Z too. When I debug the test case, I put a breakpoint just before a method call on WW. At that point, if I:
- CTRL-B : IDEA jumps into the source code
- F7 (step into): IDEA jumps into the compiled WW.class which, apparently, it finds in the jarred Z that Y has in its libraries.

Isn't that odd? Why does it even search outside module Z? Both WW and TestWW are in the same module, there is no reason to search outside... What could cause this? Any idea how I could solve this?

2 comments
Comment actions Permalink

In fact, this is not limited to the debugger
I have an interface X in a package of some module
in another package of the same module, I have a class which implements X.

But going from X to the source of the implementing class seems impossible... It always jumps to the compiled version... how strange...

How can I debug this?

0
Comment actions Permalink

I think it is all about project configuration. Do not add jarred version of Z as a library to Y. Let Y depend on Z like it really
is.

--
Best regards,
Eugene Zhuravlev
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

"Frederic Donckels" <no_mail@jetbrains.com> wrote in message news:13116935.1121257822009.JavaMail.javamailuser@localhost...

Project X has modules Y,Z

>

Module Y depends on a jarred version of Z

>

Now, I have a test case for a class WW belonging to Z, and the test case is in Z too. When I debug the test case, I put a
breakpoint just before a method call on WW. At that point, if I:
- CTRL-B : IDEA jumps into the source code
- F7 (step into): IDEA jumps into the compiled WW.class which, apparently, it finds in the jarred Z that Y has in its libraries.

>

Isn't that odd? Why does it even search outside module Z? Both WW and TestWW are in the same module, there is no reason to search
outside... What could cause this? Any idea how I could solve this?



0

Please sign in to leave a comment.