Debugger cannot find source files

When I connect to a remote java process running on a Solaris machine from my Windows XP machine, the debugger gets confused about the mapping between source files and class files. If I set a breakpoint on a line in my .java file, it works as expected, but when the debugger stops at the breakpoint, I get a warning that "the class ..., found in the project classpath, has no associated source files". If I try to single step at this point, it switches to a view of the .class file. Other classes in the same jar seem to have no problem resolving the source location

Does anyone know if there is a way to resolve this problem?

4 comments

Most likely there is more than 1 class with the same name in your project classpath. When you start a local debug session, IDEA has
additional information about what class to pick. Note the module combobox in the run configuration - this works as an additional
hint to IDEA where to find classes (in the module's classpath and across its dependencies recursively according to the order). When
you connect remotely, there are no such hints, so IDEA has to use 'global' classpath (all modules together) and use the class that
is found first. Note that this is not the only assumption made. Another assumption is that classes executed in the remote VM are in
sync with the version of sources displayed in the editor. If they are not, IDEA signals this with the cross on the breakpoint icon.


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

"Scott Stanton" <no_reply@jetbrains.com> wrote in message news:3579663.1177541572896.JavaMail.itn@is.intellij.net...

When I connect to a remote java process running on a Solaris machine from my Windows XP machine, the debugger gets confused about
the mapping between source files and class files. If I set a breakpoint on a line in my .java file, it works as expected, but
when the debugger stops at the breakpoint, I get a warning that "the class ..., found in the project classpath, has no associated
source files". If I try to single step at this point, it switches to a view of the .class file. Other classes in the same jar
seem to have no problem resolving the source location

>

Does anyone know if there is a way to resolve this problem?



0

Just ran into this now with both 8.1 and the latest Maia EAP. Took me a while to figure the solution out, so I thought i'd pass on this tip:

When you step and intellij goes into the class file rather than the source, look in the project view, or hover over the tab to see where that class file is located.  It may even be inside of a jar (was in my case). Once you've found the full path to that jar/class, delete it. Now it won't confuse IDEA anymore

1

This solution worked perfectly for me, thank you!

0

Thank you guys, that worked perfectly!! I was getting crazy!

0

Please sign in to leave a comment.