File tree Expand file tree Collapse file tree 3 files changed +52
-1
lines changed Expand file tree Collapse file tree 3 files changed +52
-1
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,7 @@ vm_service/test/regress_46419_test: SkipByDesign # Debugger is disabled in AOT m
190190vm_service/test/regress_46559_test: SkipByDesign # Debugger is disabled in AOT mode.
191191vm_service/test/regress_48279_test: SkipByDesign # Debugger is disabled in AOT mode.
192192vm_service/test/regress_55559_test: SkipByDesign # Spawns a child process from source.
193+ vm_service/test/regress_60396_test: SkipByDesign # Debugger is disabled in AOT mode.
193194vm_service/test/regress_88104_test: SkipByDesign # Debugger is disabled in AOT mode.
194195vm_service/test/reload_sources_rpc_triggers_isolate_reload_event_test: SkipByDesign # Hot reload is disabled in AOT mode.
195196vm_service/test/reload_sources_test: SkipByDesign # Hot reload is disabled in AOT mode.
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
2+ // for details. All rights reserved. Use of this source code is governed by a
3+ // BSD-style license that can be found in the LICENSE file.
4+
5+ // This is a regression test for https://dartbug.com/60396.
6+
7+ import 'common/service_test_common.dart' ;
8+ import 'common/test_helper.dart' ;
9+
10+ // AUTOGENERATED START
11+ //
12+ // Update these constants by running:
13+ //
14+ // dart pkg/vm_service/test/update_line_numbers.dart pkg/vm_service/test/regress_60396_test.dart
15+ //
16+ const LINE_A = 22 ;
17+ // AUTOGENERATED END
18+
19+ void testeeMain () {
20+ (() {
21+ (() {
22+ return 1 + 2 ; // LINE_A
23+ })();
24+ })();
25+ }
26+
27+ // We define this enum because the bug that this test is a regression test
28+ // against was that Debugger::FindBestFit would sometimes attempt to resolve
29+ // breakpoints in functions with non-real token positions like [_enumToString].
30+ enum MyEnum { A , B }
31+
32+ final tests = < IsolateTest > [
33+ hasPausedAtStart,
34+ setBreakpointAtLine (LINE_A ),
35+ resumeIsolate,
36+ hasStoppedAtBreakpoint,
37+ stoppedAtLine (LINE_A ),
38+ resumeIsolate,
39+ hasStoppedAtExit,
40+ ];
41+
42+ void main ([args = const < String > []]) => runIsolateTests (
43+ args,
44+ tests,
45+ 'regress_60396_test.dart' ,
46+ testeeConcurrent: testeeMain,
47+ pauseOnStart: true ,
48+ pauseOnExit: true ,
49+ );
Original file line number Diff line number Diff line change @@ -2505,7 +2505,8 @@ bool Debugger::FindBestFit(const Script& script,
25052505 function ^= functions.At (pos);
25062506 ASSERT (!function.IsNull ());
25072507 if (IsImplicitFunction (function) || function.is_synthetic () ||
2508- !function.is_debuggable ()) {
2508+ !function.token_pos ().IsReal () ||
2509+ !function.end_token_pos ().IsReal () || !function.is_debuggable ()) {
25092510 // We skip implicit functions and synthetic functions because they
25102511 // do not have user specifiable source locations. We also skip
25112512 // functions marked as undebuggable.
You can’t perform that action at this time.
0 commit comments