Index: editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/server/ServerBreakpointManager.java |
=================================================================== |
--- editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/server/ServerBreakpointManager.java (revision 41204) |
+++ editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/server/ServerBreakpointManager.java (working copy) |
@@ -298,19 +298,23 @@ |
if (breakpoint.isBreakpointEnabled()) { |
int line = breakpoint.getLine(); |
SetBreakpointHelper helper = new SetBreakpointHelper(isolate, breakpoint, line); |
+ |
// file path |
String filePath = breakpoint.getActualFilePath(); |
if (filePath == null) { |
continue; |
} |
+ |
// try package: URL |
{ |
String url = getPackagesUrlForFilePath(filePath); |
helper.setBreakpoint(url); |
} |
+ |
// try file:// URL |
{ |
- String url = getAbsoluteUrlForFilePath(filePath); |
+ //String url = getAbsoluteUrlForFilePath(filePath); |
+ String url = getProjectRelativePath(breakpoint.getFile()); |
helper.setBreakpoint(url); |
} |
} |
@@ -349,6 +353,7 @@ |
} |
} |
+ @SuppressWarnings("unused") |
private String getAbsoluteUrlForFilePath(String filePath) { |
return new File(filePath).toURI().toString(); |
} |
@@ -405,6 +410,10 @@ |
return pauseType; |
} |
+ private String getProjectRelativePath(IFile file) { |
+ return file.getProjectRelativePath().toPortableString(); |
scheglov
2014/10/20 21:07:13
What if we have 2 projects with lib/test.dart and
devoncarew
2014/10/20 21:37:35
Current behavior is that we set breakpoints for th
|
+ } |
+ |
private boolean supportsBreakpoint(IBreakpoint breakpoint) { |
return target.supportsBreakpoint(breakpoint); |
} |