Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1349)

Unified Diff: editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/server/ServerBreakpointManager.java

Issue 669613006: Set command-line breakpoints using the path suffix. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/server/ServerDebugTarget.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/server/ServerDebugTarget.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698