The way "Attach debugger to running process" works is that it creates a new
run configuration from the template Remote launch configuration. Its
classpath defaults to "whole project", while a custom launch configuration
is likely to have its classpath set to a certain module.

So you can try the following:
 - in you custom launch configuration (Run | Edit Configurations | your
config), see what the module is set to.
 - Go to Run | Edit Configurations | Defaults | Remote, and change the
classpath to point to the same module as in the above step.

See if that fixes the problem. If not, a reproducible test case or
instructions would be a significant help in identifying what is going on..


On Mon, Aug 11, 2014 at 1:18 PM, Michael Wallstedt <[email protected]
> wrote:

> We've run into cases where the classpath used by the debugger isn't
> ordered the way we'd expect. In a multi-module project, some classes exist
> as source of one module and as .class files in a .jar dependency of another
> module. When the app is launched with Debug, the classes are resolved from
> the source of the main module as expected. However, if the app is launched
> separately and then a debugger is attached, the classes from the jar are
> preferred. This leads to odd behavior like stopping on a breakpoint set in
> the main module, then after pressing Step Over, the view switches to the
> .class file from the .jar (without source attached).
>
> For some users this isn't an issue, so I assume there is a configuration
> somewhere that controls this. Can anyone confirm whether this behavior
> should be deterministic, and if so, what settings are relevant?
>
> --
> You received this message because you are subscribed to the Google Groups
> "adt-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to