forked from facebook/hermes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstep-over.js
More file actions
34 lines (29 loc) · 866 Bytes
/
step-over.js
File metadata and controls
34 lines (29 loc) · 866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// RUN: %hdb < %s.debug %s | %FileCheck --match-full-lines %s
// RUN: %hdb --lazy < %s.debug %s | %FileCheck --match-full-lines %s
// REQUIRES: debugger
print('step over');
// CHECK-LABEL: step over
function happy() {
print('happy');
print('stepping');
return 'this is the result';
}
debugger;
print('first');
print(happy());
print('second');
// CHECK: Break on 'debugger' statement in global: {{.*}}:21:1
// CHECK-NEXT: Stepped to global: {{.*}}:22:1
// CHECK-NEXT: first
// CHECK-NEXT: Stepped to global: {{.*}}:23:1
// CHECK-NEXT: happy
// CHECK-NEXT: stepping
// CHECK-NEXT: this is the result
// CHECK-NEXT: Stepped to global: {{.*}}:24:1
// CHECK-NEXT: second