Source lookup order for debug


In Eclipse you can order the source code lookup used for the debugger. Is this possible in intellij?  I am writing some source code that duplicates some classes in an external jar.  If I attach the source for that external jar, often I will end up in the wrong place during a debugging session.


Comment actions Permalink

Hi Oliver,

IDEA scans for sources according to dependency order defined for your modules. The search starts from the module that is specified in the run configuration that was used to start debug session.
First the compiled class is found and then corresponding sources are opened in the editor. So if the class was found in some jar, IDEA looks for attached sources to that jar (or the library that contains this jar) and opens the source file in the editor. To change source lookup order you change the order of dependencies in your project configuration.

Best regards,
  Eugene Zhuravlev

Comment actions Permalink

Maybe this is related: . Probably specific for tomcat run configurations.



Please sign in to leave a comment.