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

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

Issue 1590353002: Only show breakpoints at possible breakpoint positions in Observatory. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix tests Created 4 years, 11 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/script_inset.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 caf5f57f1fc0b9f25808800be83ea657ba887bbf..7688712d829de62ea34252620bf810fc0e0b7398 100644
--- a/runtime/observatory/lib/src/debugger/debugger_location.dart
+++ b/runtime/observatory/lib/src/debugger/debugger_location.dart
@@ -401,13 +401,14 @@ class DebuggerLocation {
// Complete the line.
var sharedPrefix = '${script.name}:';
List completions = [];
- for (var line in script.lines) {
- if (line.possibleBpt) {
- var currentLineStr = line.line.toString();
- if (currentLineStr.startsWith(lineStr)) {
- completions.add('${sharedPrefix}${currentLineStr} ');
- completions.add('${sharedPrefix}${currentLineStr}:');
- }
+ var report = await script.isolate.getSourceReport(
+ [Isolate.kPossibleBreakpointsReport], script);
+ Set<int> possibleBpts = getPossibleBreakpointLines(report, script);
+ for (var line in possibleBpts) {
+ var currentLineStr = line.toString();
+ if (currentLineStr.startsWith(lineStr)) {
+ completions.add('${sharedPrefix}${currentLineStr} ');
+ completions.add('${sharedPrefix}${currentLineStr}:');
}
}
return completions;
@@ -416,9 +417,6 @@ class DebuggerLocation {
// Complete the column.
int lineNum = int.parse(lineStr);
var scriptLine = script.getLine(lineNum);
- if (!scriptLine.possibleBpt) {
- return [];
- }
var sharedPrefix = '${script.name}:${lineStr}:';
List completions = [];
int maxCol = scriptLine.text.trimRight().runes.length;
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/script_inset.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698