| Index: editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/dartium/BreakpointManager.java
|
| diff --git a/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/dartium/BreakpointManager.java b/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/dartium/BreakpointManager.java
|
| index bfaf4ebf4b5de35e0ba810cb69e21dd20ad656ec..ee0c19b329bddfee36cbbe97e7852ac130e3820a 100644
|
| --- a/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/dartium/BreakpointManager.java
|
| +++ b/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/dartium/BreakpointManager.java
|
| @@ -39,6 +39,10 @@ import java.util.Map;
|
| * Handle adding a removing breakpoints to the WebKit connection for the DartiumDebugTarget class.
|
| */
|
| class BreakpointManager implements IBreakpointListener {
|
| +
|
| + private static String PACKAGES_DIRECTORY_PATH = "/packages/";
|
| + private static String LIB_DIRECTORY_PATH = "/lib/";
|
| +
|
| private DartiumDebugTarget debugTarget;
|
| private IResourceResolver resourceResolver;
|
|
|
| @@ -191,11 +195,22 @@ class BreakpointManager implements IBreakpointListener {
|
| // String url = resourceResolver.getUrlForResource(breakpoint.getFile());
|
| String regex = breakpoint.getFile().getFullPath().toPortableString();
|
|
|
| - int index = regex.indexOf(DartCore.PACKAGES_DIRECTORY_PATH);
|
| + int index = regex.indexOf(PACKAGES_DIRECTORY_PATH);
|
| if (index != -1) {
|
| regex = regex.substring(index);
|
| }
|
|
|
| + // check if source is located in the "lib" directory and if there is a link to it from the
|
| + // packages directory breakpoint should be /packages/...
|
| + index = regex.indexOf(LIB_DIRECTORY_PATH);
|
| + if (index != -1) {
|
| + String packageName = DartCore.getSelfLinkedPackageName(breakpoint.getFile().getProject());
|
| + if (packageName != null) {
|
| + regex = PACKAGES_DIRECTORY_PATH + packageName + "/"
|
| + + regex.substring(index + LIB_DIRECTORY_PATH.length());
|
| + }
|
| + }
|
| +
|
| int line = WebkitLocation.eclipseToWebkitLine(breakpoint.getLine());
|
|
|
| debugTarget.getWebkitConnection().getDebugger().setBreakpointByUrl(
|
|
|