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

Unified Diff: runtime/observatory/lib/src/debugger/debugger_location.dart

Issue 1312763010: Support column-based breakpoints in the VM and Observatory. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: hausner review Created 5 years, 3 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 | runtime/observatory/lib/src/elements/debugger.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/src/debugger/debugger_location.dart
diff --git a/runtime/observatory/lib/src/debugger/debugger_location.dart b/runtime/observatory/lib/src/debugger/debugger_location.dart
index 469609bf9603d14643d56b256432c2a678270ca0..a517cd28ab3fada3c2508bc650be83517ad6461e 100644
--- a/runtime/observatory/lib/src/debugger/debugger_location.dart
+++ b/runtime/observatory/lib/src/debugger/debugger_location.dart
@@ -52,8 +52,8 @@ class DebuggerLocation {
Script script = frame.location.script;
return script.load().then((_) {
var line = script.tokenToLine(frame.location.tokenPos);
- // TODO(turnidge): Pass in the column here once the protocol supports it.
- return new Future.value(new DebuggerLocation.file(script, line, null));
+ var col = script.tokenToCol(frame.location.tokenPos);
+ return new Future.value(new DebuggerLocation.file(script, line, col));
});
}
@@ -101,8 +101,11 @@ class DebuggerLocation {
return new Future.value(new DebuggerLocation.error(
'A script must be provided when the stack is empty'));
}
- Script script = stack['frames'][0].location.script;
- return new Future.value(new DebuggerLocation.file(script, line, col));
+ var frame = stack['frames'][debugger.currentFrame];
+ Script script = frame.location.script;
+ return script.load().then((_) {
+ return new Future.value(new DebuggerLocation.file(script, line, col));
+ });
}
}
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/debugger.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698