- if (breakpointFile != null) {
- final Collection<VirtualFile> candidates = findClassFileCandidates(className, debugProcess.getSearchScope());
- if (!candidates.isEmpty()) {
- for (VirtualFile classFile : candidates) {
- if (breakpointFile.equals(classFile)) {
- return true;
- }
+ final ProjectFileIndex fileIndex = ProjectRootManager.getInstance(myProject).getFileIndex();
+ if (breakpointFile != null && fileIndex.isInSourceContent(breakpointFile)) {
+ // apply filtering to breakpoints from content sources only, not for sources attached to libraries
+ for (VirtualFile classFile : findClassCandidatesInSourceContent(className, debugProcess.getSearchScope(), fileIndex)) {
+ if (breakpointFile.equals(classFile)) {
+ return true;