diff --git a/dwds/CHANGELOG.md b/dwds/CHANGELOG.md index 674ec5c87..10530c9aa 100644 --- a/dwds/CHANGELOG.md +++ b/dwds/CHANGELOG.md @@ -1,6 +1,8 @@ ## 14.0.1-dev - Add `libraryFilters` optional parameter to the vm service implememtation of `getSourceReport`. +- Update temp variable detection heuristics so internal JS type objects do + not show in the debugger. ## 14.0.0 - Add column information to breakpoints to allow precise breakpoint placement. diff --git a/dwds/lib/src/debugging/dart_scope.dart b/dwds/lib/src/debugging/dart_scope.dart index 0c6bc4de4..b27ed50d4 100644 --- a/dwds/lib/src/debugging/dart_scope.dart +++ b/dwds/lib/src/debugging/dart_scope.dart @@ -11,7 +11,7 @@ import 'debugger.dart'; // TODO(sdk/issues/44262) - use an alternative way to identify synthetic // variables. -final ddcTemporaryVariableRegExp = RegExp(r'^(t[0-9]+\$?[0-9]*|__t\$\w*)$'); +final ddcTemporaryVariableRegExp = RegExp(r'^(t[0-9]+\$?[0-9]*|__t[\$\w*]+)$'); /// Find the visible Dart properties from a JS Scope Chain, coming from the /// scopeChain attribute of a Chrome CallFrame corresponding to [frame]. diff --git a/dwds/test/variable_scope_test.dart b/dwds/test/variable_scope_test.dart index eb00efe88..390a68cdc 100644 --- a/dwds/test/variable_scope_test.dart +++ b/dwds/test/variable_scope_test.dart @@ -39,6 +39,8 @@ void main() { expect(ddcTemporaryVariableRegExp.hasMatch(r't10'), isTrue); expect(ddcTemporaryVariableRegExp.hasMatch(r'__t$TL'), isTrue); expect(ddcTemporaryVariableRegExp.hasMatch(r'__t$StringN'), isTrue); + expect(ddcTemporaryVariableRegExp.hasMatch(r'__t$IdentityMapOfString$T'), + isTrue); expect(ddcTemporaryVariableRegExp.hasMatch(r't'), isFalse); expect(ddcTemporaryVariableRegExp.hasMatch(r't10foo'), isFalse);