forked from xuos/xiuos
add jerryscript source code
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
s
|
||||
s
|
||||
s
|
||||
continue
|
||||
@@ -0,0 +1,15 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/client_source.js:15
|
||||
(jerry-debugger) s
|
||||
out: client-source-test
|
||||
Stopped at tests/debugger/client_source.js:40
|
||||
(jerry-debugger) s
|
||||
Stopped at tests/debugger/client_source.js:35 (in test() at line:33, col:1)
|
||||
(jerry-debugger) s
|
||||
out: function test
|
||||
Stopped at tests/debugger/client_source.js:36 (in test() at line:33, col:1)
|
||||
(jerry-debugger) continue
|
||||
out: function foo
|
||||
out: function bar
|
||||
out: function finish
|
||||
out: finish: test-foo-bar
|
||||
@@ -0,0 +1,40 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
print("client-source-test");
|
||||
|
||||
function finish(z) {
|
||||
print("function finish");
|
||||
print("finish: " + z);
|
||||
}
|
||||
|
||||
function bar(y) {
|
||||
print("function bar");
|
||||
finish(y + "-bar");
|
||||
}
|
||||
|
||||
function foo(x)
|
||||
{
|
||||
print("function foo");
|
||||
bar(x + "-foo");
|
||||
}
|
||||
|
||||
function test()
|
||||
{
|
||||
print("function test");
|
||||
var x = "test";
|
||||
foo(x);
|
||||
}
|
||||
|
||||
test();
|
||||
@@ -0,0 +1,7 @@
|
||||
n
|
||||
n
|
||||
s
|
||||
s
|
||||
s
|
||||
s
|
||||
c
|
||||
@@ -0,0 +1,22 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/client_source_multiple_2.js:15
|
||||
(jerry-debugger) n
|
||||
out: multiple-client-source-test-file-2
|
||||
Stopped at tests/debugger/client_source_multiple_1.js:15
|
||||
(jerry-debugger) n
|
||||
out: multiple-client-source-test-file-1
|
||||
Stopped at tests/debugger/client_source_multiple_1.js:27
|
||||
(jerry-debugger) s
|
||||
Stopped at tests/debugger/client_source_multiple_1.js:18 (in foo() at line:17, col:1)
|
||||
(jerry-debugger) s
|
||||
out: foo
|
||||
Stopped at tests/debugger/client_source_multiple_1.js:19 (in foo() at line:17, col:1)
|
||||
(jerry-debugger) s
|
||||
Stopped at tests/debugger/client_source_multiple_2.js:18 (in bar() at line:17, col:1)
|
||||
(jerry-debugger) s
|
||||
out: bar
|
||||
Stopped at tests/debugger/client_source_multiple_2.js:19 (in bar() at line:17, col:1)
|
||||
(jerry-debugger) c
|
||||
out: str-argument: called-from-test-file-1
|
||||
out: crossFoo
|
||||
out: str-argument: called-from-test-file-2
|
||||
@@ -0,0 +1,27 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
print("multiple-client-source-test-file-1");
|
||||
|
||||
function foo() {
|
||||
print("foo");
|
||||
bar("called-from-test-file-1");
|
||||
}
|
||||
|
||||
function crossFoo(str) {
|
||||
print("crossFoo");
|
||||
print("str-argument: " + str);
|
||||
}
|
||||
|
||||
foo();
|
||||
@@ -0,0 +1,21 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
print("multiple-client-source-test-file-2");
|
||||
|
||||
function bar(str) {
|
||||
print("bar");
|
||||
print("str-argument: " + str);
|
||||
crossFoo("called-from-test-file-2");
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
s
|
||||
s
|
||||
s
|
||||
s
|
||||
abort new Error('Fatal error :)')
|
||||
@@ -0,0 +1,12 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_abort.js:24
|
||||
(jerry-debugger) s
|
||||
Stopped at tests/debugger/do_abort.js:25
|
||||
(jerry-debugger) s
|
||||
Stopped at tests/debugger/do_abort.js:26
|
||||
(jerry-debugger) s
|
||||
Stopped at tests/debugger/do_abort.js:20 (in g() at line:19, col:1)
|
||||
(jerry-debugger) s
|
||||
Stopped at tests/debugger/do_abort.js:16 (in f() at line:15, col:1)
|
||||
(jerry-debugger) abort new Error('Fatal error :)')
|
||||
err: Error: Fatal error :)
|
||||
@@ -0,0 +1,30 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
function f() {
|
||||
return 32;
|
||||
}
|
||||
|
||||
function g() {
|
||||
f();
|
||||
}
|
||||
|
||||
// In regular JS, it is not possible to escape from this loop
|
||||
while (true) {
|
||||
try {
|
||||
g();
|
||||
} catch (e) {
|
||||
var s = "Don't stop here";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
next
|
||||
n
|
||||
next
|
||||
step
|
||||
next
|
||||
s
|
||||
bt 1 2 t
|
||||
bt 1 2
|
||||
bt 0 3 t
|
||||
bt
|
||||
bt 2
|
||||
bt 2 t
|
||||
n
|
||||
n
|
||||
s
|
||||
backtrace
|
||||
bt 4 4
|
||||
bt 600 919
|
||||
bt 3 500
|
||||
bt 42
|
||||
bt 4 3
|
||||
c
|
||||
@@ -0,0 +1,62 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_backtrace.js:15
|
||||
(jerry-debugger) next
|
||||
out: backtrace-test
|
||||
Stopped at tests/debugger/do_backtrace.js:28
|
||||
(jerry-debugger) n
|
||||
Stopped at tests/debugger/do_backtrace.js:37
|
||||
(jerry-debugger) next
|
||||
Stopped at tests/debugger/do_backtrace.js:40
|
||||
(jerry-debugger) step
|
||||
Stopped at tests/debugger/do_backtrace.js:32 (in test() at line:30, col:1)
|
||||
(jerry-debugger) next
|
||||
out: function test
|
||||
Stopped at tests/debugger/do_backtrace.js:33 (in test() at line:30, col:1)
|
||||
(jerry-debugger) s
|
||||
Stopped at tests/debugger/do_backtrace.js:23 (in foo() at line:21, col:1)
|
||||
(jerry-debugger) bt 1 2 t
|
||||
Total number of frames: 3
|
||||
Frame 1: tests/debugger/do_backtrace.js:33 (in test() at line:30, col:1)
|
||||
(jerry-debugger) bt 1 2
|
||||
Frame 1: tests/debugger/do_backtrace.js:33 (in test() at line:30, col:1)
|
||||
(jerry-debugger) bt 0 3 t
|
||||
Total number of frames: 3
|
||||
Frame 0: tests/debugger/do_backtrace.js:23 (in foo() at line:21, col:1)
|
||||
Frame 1: tests/debugger/do_backtrace.js:33 (in test() at line:30, col:1)
|
||||
Frame 2: tests/debugger/do_backtrace.js:40
|
||||
(jerry-debugger) bt
|
||||
Frame 0: tests/debugger/do_backtrace.js:23 (in foo() at line:21, col:1)
|
||||
Frame 1: tests/debugger/do_backtrace.js:33 (in test() at line:30, col:1)
|
||||
Frame 2: tests/debugger/do_backtrace.js:40
|
||||
(jerry-debugger) bt 2
|
||||
Frame 0: tests/debugger/do_backtrace.js:23 (in foo() at line:21, col:1)
|
||||
Frame 1: tests/debugger/do_backtrace.js:33 (in test() at line:30, col:1)
|
||||
(jerry-debugger) bt 2 t
|
||||
Total number of frames: 3
|
||||
Frame 0: tests/debugger/do_backtrace.js:23 (in foo() at line:21, col:1)
|
||||
Frame 1: tests/debugger/do_backtrace.js:33 (in test() at line:30, col:1)
|
||||
(jerry-debugger) n
|
||||
out: function foo
|
||||
Stopped at tests/debugger/do_backtrace.js:24 (in foo() at line:21, col:1)
|
||||
(jerry-debugger) n
|
||||
Stopped at tests/debugger/do_backtrace.js:25 (in foo() at line:21, col:1)
|
||||
(jerry-debugger) s
|
||||
Stopped at tests/debugger/do_backtrace.js:18 (in f4() at line:17, col:1)
|
||||
(jerry-debugger) backtrace
|
||||
Frame 0: tests/debugger/do_backtrace.js:18 (in f4() at line:17, col:1)
|
||||
Frame 1: tests/debugger/do_backtrace.js:25 (in foo() at line:21, col:1)
|
||||
Frame 2: tests/debugger/do_backtrace.js:33 (in test() at line:30, col:1)
|
||||
Frame 3: tests/debugger/do_backtrace.js:40
|
||||
(jerry-debugger) bt 4 4
|
||||
(jerry-debugger) bt 600 919
|
||||
(jerry-debugger) bt 3 500
|
||||
Frame 3: tests/debugger/do_backtrace.js:40
|
||||
(jerry-debugger) bt 42
|
||||
Frame 0: tests/debugger/do_backtrace.js:18 (in f4() at line:17, col:1)
|
||||
Frame 1: tests/debugger/do_backtrace.js:25 (in foo() at line:21, col:1)
|
||||
Frame 2: tests/debugger/do_backtrace.js:33 (in test() at line:30, col:1)
|
||||
Frame 3: tests/debugger/do_backtrace.js:40
|
||||
(jerry-debugger) bt 4 3
|
||||
Error: Start depth needs to be lower than or equal to max depth
|
||||
(jerry-debugger) c
|
||||
out: function f4
|
||||
@@ -0,0 +1,40 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
print("backtrace-test");
|
||||
|
||||
function f4() {
|
||||
print("function f4");
|
||||
}
|
||||
|
||||
function foo()
|
||||
{
|
||||
print("function foo");
|
||||
var tmp = 4;
|
||||
f4();
|
||||
}
|
||||
|
||||
var cat = 'cat';
|
||||
|
||||
function test()
|
||||
{
|
||||
print("function test");
|
||||
foo();
|
||||
}
|
||||
|
||||
var
|
||||
x =
|
||||
1;
|
||||
|
||||
test();
|
||||
@@ -0,0 +1,10 @@
|
||||
break do_break.js:51
|
||||
b do_break.js:36
|
||||
break f
|
||||
list
|
||||
c
|
||||
delete 1
|
||||
list
|
||||
c
|
||||
continue
|
||||
c
|
||||
@@ -0,0 +1,32 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_break.js:15
|
||||
(jerry-debugger) break do_break.js:51
|
||||
Breakpoint 1 at tests/debugger/do_break.js:51
|
||||
(jerry-debugger) b do_break.js:36
|
||||
Breakpoint 2 at tests/debugger/do_break.js:36 (in test() at line:20, col:1)
|
||||
(jerry-debugger) break f
|
||||
Breakpoint 3 at tests/debugger/do_break.js:33 (in f() at line:31, col:3)
|
||||
Breakpoint 4 at tests/debugger/do_break.js:45 (in f() at line:43, col:1)
|
||||
(jerry-debugger) list
|
||||
=== Active breakpoints ===
|
||||
1: tests/debugger/do_break.js:51
|
||||
2: tests/debugger/do_break.js:36 (in test() at line:20, col:1)
|
||||
3: tests/debugger/do_break.js:33 (in f() at line:31, col:3)
|
||||
4: tests/debugger/do_break.js:45 (in f() at line:43, col:1)
|
||||
(jerry-debugger) c
|
||||
out: break test
|
||||
out: var cat
|
||||
Stopped at breakpoint:1 tests/debugger/do_break.js:51
|
||||
(jerry-debugger) delete 1
|
||||
Breakpoint 1 deleted
|
||||
(jerry-debugger) list
|
||||
=== Active breakpoints ===
|
||||
2: tests/debugger/do_break.js:36 (in test() at line:20, col:1)
|
||||
3: tests/debugger/do_break.js:33 (in f() at line:31, col:3)
|
||||
4: tests/debugger/do_break.js:45 (in f() at line:43, col:1)
|
||||
(jerry-debugger) c
|
||||
Stopped at breakpoint:2 tests/debugger/do_break.js:36 (in test() at line:20, col:1)
|
||||
(jerry-debugger) continue
|
||||
out: function test
|
||||
Stopped at breakpoint:3 tests/debugger/do_break.js:33 (in f() at line:31, col:3)
|
||||
(jerry-debugger) c
|
||||
@@ -0,0 +1,51 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
print("break test");
|
||||
|
||||
print ("var cat");
|
||||
var cat = 'cat';
|
||||
|
||||
function test(x)
|
||||
{
|
||||
function f() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
function f() {
|
||||
/* Again. */
|
||||
return 1;
|
||||
}
|
||||
|
||||
function f() {
|
||||
/* And again. */
|
||||
return 2;
|
||||
}
|
||||
|
||||
print("function test");
|
||||
var a = 3;
|
||||
var b = 5, c = a + b;
|
||||
global_var = f();
|
||||
return c;
|
||||
}
|
||||
|
||||
function f() {
|
||||
/* And again. */
|
||||
}
|
||||
|
||||
var
|
||||
x =
|
||||
1;
|
||||
|
||||
test(x);
|
||||
@@ -0,0 +1 @@
|
||||
continue
|
||||
@@ -0,0 +1,3 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_continue.js:16
|
||||
(jerry-debugger) continue
|
||||
@@ -0,0 +1,15 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
/* Empty file. */
|
||||
@@ -0,0 +1,12 @@
|
||||
next
|
||||
b do_delete.js:17
|
||||
b do_delete.js:21
|
||||
y
|
||||
b do_delete.js:19
|
||||
b do_delete.js:18
|
||||
list
|
||||
delete 2
|
||||
delete 3
|
||||
list
|
||||
c
|
||||
c
|
||||
@@ -0,0 +1,31 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_delete.js:15
|
||||
(jerry-debugger) next
|
||||
out: delete tests
|
||||
Stopped at tests/debugger/do_delete.js:17
|
||||
(jerry-debugger) b do_delete.js:17
|
||||
Breakpoint 1 at tests/debugger/do_delete.js:17
|
||||
(jerry-debugger) b do_delete.js:21
|
||||
No breakpoint found, do you want to add a pending breakpoint? (y or [n]) Pending breakpoint 2 at do_delete.js:21
|
||||
(jerry-debugger) b do_delete.js:19
|
||||
Breakpoint 3 at tests/debugger/do_delete.js:19
|
||||
(jerry-debugger) b do_delete.js:18
|
||||
Breakpoint 4 at tests/debugger/do_delete.js:18
|
||||
(jerry-debugger) list
|
||||
=== Active breakpoints ===
|
||||
1: tests/debugger/do_delete.js:17
|
||||
3: tests/debugger/do_delete.js:19
|
||||
4: tests/debugger/do_delete.js:18
|
||||
=== Pending breakpoints ===
|
||||
2: do_delete.js:21 (pending)
|
||||
(jerry-debugger) delete 2
|
||||
Pending breakpoint 2 deleted
|
||||
(jerry-debugger) delete 3
|
||||
Breakpoint 3 deleted
|
||||
(jerry-debugger) list
|
||||
=== Active breakpoints ===
|
||||
1: tests/debugger/do_delete.js:17
|
||||
4: tests/debugger/do_delete.js:18
|
||||
(jerry-debugger) c
|
||||
Stopped at breakpoint:4 tests/debugger/do_delete.js:18
|
||||
(jerry-debugger) c
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
print("delete tests");
|
||||
|
||||
var x = 10;
|
||||
var y = 10;
|
||||
var pi = 3.14;
|
||||
|
||||
function delete_test(x,y) {
|
||||
var sum = x + y;
|
||||
return
|
||||
}
|
||||
|
||||
delete_test(x, y);
|
||||
|
||||
var z = 0;
|
||||
@@ -0,0 +1,11 @@
|
||||
break do_delete_all.js:17
|
||||
b do_delete_all.js:18
|
||||
b do_delete_all.js:21
|
||||
b do_delete_all:350
|
||||
y
|
||||
b do_delete_all:37
|
||||
y
|
||||
list
|
||||
delete all
|
||||
next
|
||||
c
|
||||
@@ -0,0 +1,24 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_delete_all.js:15
|
||||
(jerry-debugger) break do_delete_all.js:17
|
||||
Breakpoint 1 at tests/debugger/do_delete_all.js:17
|
||||
(jerry-debugger) b do_delete_all.js:18
|
||||
Breakpoint 2 at tests/debugger/do_delete_all.js:18
|
||||
(jerry-debugger) b do_delete_all.js:21
|
||||
Breakpoint 3 at tests/debugger/do_delete_all.js:21 (in delete_test() at line:20, col:1)
|
||||
(jerry-debugger) b do_delete_all:350
|
||||
No breakpoint found, do you want to add a pending breakpoint? (y or [n]) Pending breakpoint 4 at do_delete_all:350
|
||||
(jerry-debugger) b do_delete_all:37
|
||||
No breakpoint found, do you want to add a pending breakpoint? (y or [n]) Pending breakpoint 5 at do_delete_all:37
|
||||
(jerry-debugger) list
|
||||
=== Active breakpoints ===
|
||||
1: tests/debugger/do_delete_all.js:17
|
||||
2: tests/debugger/do_delete_all.js:18
|
||||
3: tests/debugger/do_delete_all.js:21 (in delete_test() at line:20, col:1)
|
||||
=== Pending breakpoints ===
|
||||
4: do_delete_all:350 (pending)
|
||||
5: do_delete_all:37 (pending)
|
||||
(jerry-debugger) delete all
|
||||
(jerry-debugger) next
|
||||
Stopped at tests/debugger/do_delete_all.js:16
|
||||
(jerry-debugger) c
|
||||
@@ -0,0 +1,22 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var str = "Delete all breakpoints";
|
||||
var patt = new RegExp("e");
|
||||
var res = patt.test(str);
|
||||
var pi = Math.PI;
|
||||
|
||||
function delete_test(x,y) {
|
||||
var sum = x + y;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
b a
|
||||
b b
|
||||
b c
|
||||
b d
|
||||
display
|
||||
c
|
||||
display 2
|
||||
c
|
||||
display 5435
|
||||
c
|
||||
display 0
|
||||
c
|
||||
c
|
||||
@@ -0,0 +1,56 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_display.js:20
|
||||
(jerry-debugger) b a
|
||||
Breakpoint 1 at tests/debugger/do_display.js:15 (in a() at line:15, col:1)
|
||||
(jerry-debugger) b b
|
||||
Breakpoint 2 at tests/debugger/do_display.js:16 (in b() at line:16, col:1)
|
||||
(jerry-debugger) b c
|
||||
Breakpoint 3 at tests/debugger/do_display.js:17 (in c() at line:17, col:1)
|
||||
(jerry-debugger) b d
|
||||
Breakpoint 4 at tests/debugger/do_display.js:18 (in d() at line:18, col:1)
|
||||
(jerry-debugger) display
|
||||
Non-negative integer number expected, 0 turns off this function
|
||||
(jerry-debugger) c
|
||||
Stopped at breakpoint:1 tests/debugger/do_display.js:15 (in a() at line:15, col:1)
|
||||
(jerry-debugger) display 2
|
||||
(jerry-debugger) c
|
||||
out: hi
|
||||
Stopped at breakpoint:2 tests/debugger/do_display.js:16 (in b() at line:16, col:1)
|
||||
Source: tests/debugger/do_display.js
|
||||
15 function a() { print("hi"); }
|
||||
16 > function b() { print("welcome"); }
|
||||
17 function c() { print("hello"); }
|
||||
(jerry-debugger) display 5435
|
||||
(jerry-debugger) c
|
||||
out: welcome
|
||||
Stopped at breakpoint:3 tests/debugger/do_display.js:17 (in c() at line:17, col:1)
|
||||
Source: tests/debugger/do_display.js
|
||||
1 // Copyright JS Foundation and other contributors, http://js.foundation
|
||||
2 //
|
||||
3 // Licensed under the Apache License, Version 2.0 (the "License");
|
||||
4 // you may not use this file except in compliance with the License.
|
||||
5 // You may obtain a copy of the License at
|
||||
6 //
|
||||
7 // http://www.apache.org/licenses/LICENSE-2.0
|
||||
8 //
|
||||
9 // Unless required by applicable law or agreed to in writing, software
|
||||
10 // distributed under the License is distributed on an "AS IS" BASIS
|
||||
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
12 // See the License for the specific language governing permissions and
|
||||
13 // limitations under the License.
|
||||
14
|
||||
15 function a() { print("hi"); }
|
||||
16 function b() { print("welcome"); }
|
||||
17 > function c() { print("hello"); }
|
||||
18 function d() { print("goodbye"); }
|
||||
19
|
||||
20 a();
|
||||
21 b();
|
||||
22 c();
|
||||
23 d();
|
||||
(jerry-debugger) display 0
|
||||
(jerry-debugger) c
|
||||
out: hello
|
||||
Stopped at breakpoint:4 tests/debugger/do_display.js:18 (in d() at line:18, col:1)
|
||||
(jerry-debugger) c
|
||||
out: goodbye
|
||||
@@ -0,0 +1,23 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
function a() { print("hi"); }
|
||||
function b() { print("welcome"); }
|
||||
function c() { print("hello"); }
|
||||
function d() { print("goodbye"); }
|
||||
|
||||
a();
|
||||
b();
|
||||
c();
|
||||
d();
|
||||
@@ -0,0 +1,13 @@
|
||||
e a
|
||||
n
|
||||
eval a
|
||||
break f
|
||||
n
|
||||
p b
|
||||
next
|
||||
print b
|
||||
e "1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 XXX 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 YYY 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 ZZZ " + 123
|
||||
e b = 8
|
||||
n
|
||||
e a
|
||||
c
|
||||
@@ -0,0 +1,27 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_eval.js:15
|
||||
(jerry-debugger) e a
|
||||
undefined
|
||||
(jerry-debugger) n
|
||||
Stopped at tests/debugger/do_eval.js:23
|
||||
(jerry-debugger) eval a
|
||||
5
|
||||
(jerry-debugger) break f
|
||||
Breakpoint 1 at tests/debugger/do_eval.js:19 (in f() at line:17, col:1)
|
||||
(jerry-debugger) n
|
||||
Stopped at breakpoint:1 tests/debugger/do_eval.js:19 (in f() at line:17, col:1)
|
||||
(jerry-debugger) p b
|
||||
undefined
|
||||
(jerry-debugger) next
|
||||
Stopped at tests/debugger/do_eval.js:20 (in f() at line:17, col:1)
|
||||
(jerry-debugger) print b
|
||||
6
|
||||
(jerry-debugger) e "1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 XXX 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 YYY 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 ZZZ " + 123
|
||||
1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 XXX 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 YYY 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 ZZZ 123
|
||||
(jerry-debugger) e b = 8
|
||||
8
|
||||
(jerry-debugger) n
|
||||
Stopped at tests/debugger/do_eval.js:24
|
||||
(jerry-debugger) e a
|
||||
11.3
|
||||
(jerry-debugger) c
|
||||
@@ -0,0 +1,24 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = 5;
|
||||
|
||||
function f(a)
|
||||
{
|
||||
var b = 6;
|
||||
return a + b;
|
||||
}
|
||||
|
||||
a = f(3.3);
|
||||
null;
|
||||
@@ -0,0 +1,20 @@
|
||||
eval_at 0
|
||||
eval_at 0 b
|
||||
n
|
||||
eval_at 0 b
|
||||
b do_eval_at.js:20
|
||||
n
|
||||
scope
|
||||
eval_at 0 b
|
||||
eval_at 1 b
|
||||
eval_at 0 b=20
|
||||
eval_at 1 b=100
|
||||
n
|
||||
eval_at 0 a
|
||||
scope
|
||||
eval_at 0 b
|
||||
eval_at -1 b
|
||||
eval_at 65536 b
|
||||
eval_at b
|
||||
eval_at 200
|
||||
c
|
||||
@@ -0,0 +1,44 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_eval_at.js:15
|
||||
(jerry-debugger) eval_at 0
|
||||
undefined
|
||||
(jerry-debugger) eval_at 0 b
|
||||
undefined
|
||||
(jerry-debugger) n
|
||||
Stopped at tests/debugger/do_eval_at.js:23
|
||||
(jerry-debugger) eval_at 0 b
|
||||
2
|
||||
(jerry-debugger) b do_eval_at.js:20
|
||||
Breakpoint 1 at tests/debugger/do_eval_at.js:20 (in f() at line:17, col:1)
|
||||
(jerry-debugger) n
|
||||
Stopped at breakpoint:1 tests/debugger/do_eval_at.js:20 (in f() at line:17, col:1)
|
||||
(jerry-debugger) scope
|
||||
level | type
|
||||
0 | local
|
||||
1 | global
|
||||
(jerry-debugger) eval_at 0 b
|
||||
6
|
||||
(jerry-debugger) eval_at 1 b
|
||||
2
|
||||
(jerry-debugger) eval_at 0 b=20
|
||||
20
|
||||
(jerry-debugger) eval_at 1 b=100
|
||||
100
|
||||
(jerry-debugger) n
|
||||
Stopped at tests/debugger/do_eval_at.js:25
|
||||
(jerry-debugger) eval_at 0 a
|
||||
23
|
||||
(jerry-debugger) scope
|
||||
level | type
|
||||
0 | global
|
||||
(jerry-debugger) eval_at 0 b
|
||||
100
|
||||
(jerry-debugger) eval_at -1 b
|
||||
Error: Invalid scope chain index: -1 (must be between 0 and 65535)
|
||||
(jerry-debugger) eval_at 65536 b
|
||||
Error: Invalid scope chain index: 65536 (must be between 0 and 65535)
|
||||
(jerry-debugger) eval_at b
|
||||
Error: invalid literal for int() with base 10: 'b'
|
||||
(jerry-debugger) eval_at 200
|
||||
Uncaught exception: Error
|
||||
(jerry-debugger) c
|
||||
@@ -0,0 +1,25 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var b = 2;
|
||||
|
||||
function f(a)
|
||||
{
|
||||
var b = 6;
|
||||
return a + b;
|
||||
}
|
||||
|
||||
var a = f(3);
|
||||
|
||||
null;
|
||||
@@ -0,0 +1,3 @@
|
||||
n
|
||||
eval loop
|
||||
c
|
||||
@@ -0,0 +1,8 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_eval_syntax.js:24
|
||||
(jerry-debugger) n
|
||||
Stopped at tests/debugger/do_eval_syntax.js:26
|
||||
(jerry-debugger) eval loop
|
||||
Uncaught exception: Error
|
||||
(jerry-debugger) c
|
||||
out: bar function
|
||||
@@ -0,0 +1,27 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
function foo(loop)
|
||||
{
|
||||
while(loop)
|
||||
{
|
||||
print("eval");
|
||||
print("syntax");
|
||||
}
|
||||
}
|
||||
|
||||
var a = 10;
|
||||
|
||||
eval("bar = function bar() {\nprint('bar function') }");
|
||||
bar();
|
||||
@@ -0,0 +1,5 @@
|
||||
c
|
||||
c
|
||||
c
|
||||
c
|
||||
quit
|
||||
@@ -0,0 +1,20 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_exception.js:15
|
||||
(jerry-debugger) c
|
||||
out: exception handler configuration test
|
||||
Exception throw detected (to disable automatic stop type exception 0)
|
||||
Exception hint: TypeError
|
||||
Stopped around tests/debugger/do_exception.js:19 (in foo() at line:17, col:1)
|
||||
(jerry-debugger) c
|
||||
Exception throw detected (to disable automatic stop type exception 0)
|
||||
Exception hint: ReferenceError
|
||||
Stopped at tests/debugger/do_exception.js:24 (in foo() at line:17, col:1)
|
||||
(jerry-debugger) c
|
||||
Exception throw detected (to disable automatic stop type exception 0)
|
||||
Exception hint: 456
|
||||
Stopped at tests/debugger/do_exception.js:29 (in foo() at line:17, col:1)
|
||||
(jerry-debugger) c
|
||||
Exception throw detected (to disable automatic stop type exception 0)
|
||||
Exception hint: RangeError: Bad range!
|
||||
Stopped around tests/debugger/do_exception.js:34 (in foo() at line:17, col:1)
|
||||
(jerry-debugger) quit
|
||||
@@ -0,0 +1,39 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
print("exception handler configuration test")
|
||||
|
||||
function foo() {
|
||||
try {
|
||||
undefined();
|
||||
} catch (e) {
|
||||
}
|
||||
|
||||
try {
|
||||
xxx();
|
||||
} catch (e) {
|
||||
}
|
||||
|
||||
try {
|
||||
throw 456;
|
||||
} catch (e) {
|
||||
}
|
||||
|
||||
try {
|
||||
throw new RangeError("Bad range!");
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
|
||||
foo()
|
||||
@@ -0,0 +1,6 @@
|
||||
finish
|
||||
finish
|
||||
finish
|
||||
step
|
||||
finish
|
||||
continue
|
||||
@@ -0,0 +1,20 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_finish.js:15
|
||||
(jerry-debugger) finish
|
||||
out: finish-test
|
||||
Stopped at tests/debugger/do_finish.js:26
|
||||
(jerry-debugger) finish
|
||||
Stopped at tests/debugger/do_finish.js:18 (in foo() at line:17, col:1)
|
||||
(jerry-debugger) finish
|
||||
out: foo
|
||||
out: bar
|
||||
Stopped at tests/debugger/do_finish.js:42
|
||||
(jerry-debugger) step
|
||||
Stopped at tests/debugger/do_finish.js:29 (in dog() at line:28, col:1)
|
||||
(jerry-debugger) finish
|
||||
out: *bark*
|
||||
out: *sit*
|
||||
out: *bark*
|
||||
Stopped at tests/debugger/do_finish.js:44
|
||||
(jerry-debugger) continue
|
||||
out: END: finish-test
|
||||
@@ -0,0 +1,44 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
print("finish-test");
|
||||
|
||||
function foo() {
|
||||
print("foo");
|
||||
return bar();
|
||||
}
|
||||
|
||||
function bar() {
|
||||
return "bar";
|
||||
}
|
||||
|
||||
print(foo());
|
||||
|
||||
function dog() {
|
||||
bark();
|
||||
sit();
|
||||
bark();
|
||||
}
|
||||
|
||||
function bark() {
|
||||
print("*bark*");
|
||||
}
|
||||
|
||||
function sit() {
|
||||
print("*sit*");
|
||||
}
|
||||
|
||||
dog();
|
||||
|
||||
print("END: finish-test");
|
||||
@@ -0,0 +1,2 @@
|
||||
help
|
||||
quit
|
||||
@@ -0,0 +1,13 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_help.js:15
|
||||
(jerry-debugger) help
|
||||
|
||||
Documented commands (type help <topic>):
|
||||
========================================
|
||||
EOF bt dump f ms quit scroll variables
|
||||
abort c e finish n res source
|
||||
b continue eval help next restart src
|
||||
backtrace delete eval_at list p s step
|
||||
break display exception memstats print scope throw
|
||||
|
||||
(jerry-debugger) quit
|
||||
@@ -0,0 +1,15 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
print("help tests");
|
||||
@@ -0,0 +1,4 @@
|
||||
b do_list.js:18
|
||||
b do_list.js:19
|
||||
list
|
||||
quit
|
||||
@@ -0,0 +1,11 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_list.js:15
|
||||
(jerry-debugger) b do_list.js:18
|
||||
Breakpoint 1 at tests/debugger/do_list.js:18
|
||||
(jerry-debugger) b do_list.js:19
|
||||
Breakpoint 2 at tests/debugger/do_list.js:19
|
||||
(jerry-debugger) list
|
||||
=== Active breakpoints ===
|
||||
1: tests/debugger/do_list.js:18
|
||||
2: tests/debugger/do_list.js:19
|
||||
(jerry-debugger) quit
|
||||
@@ -0,0 +1,20 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
print("list tests");
|
||||
|
||||
var x = 10;
|
||||
var y = 10;
|
||||
var pi = 3.14;
|
||||
var z = x + y;
|
||||
@@ -0,0 +1,3 @@
|
||||
next
|
||||
next
|
||||
c
|
||||
@@ -0,0 +1,9 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_next.js:15
|
||||
(jerry-debugger) next
|
||||
out: next test
|
||||
Stopped at tests/debugger/do_next.js:17
|
||||
(jerry-debugger) next
|
||||
out: var cat
|
||||
Stopped at tests/debugger/do_next.js:18
|
||||
(jerry-debugger) c
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
print("next test");
|
||||
|
||||
print ("var cat");
|
||||
var cat = 'cat';
|
||||
|
||||
function test()
|
||||
{
|
||||
function f()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
test();
|
||||
@@ -0,0 +1,9 @@
|
||||
break :1
|
||||
y
|
||||
break f
|
||||
y
|
||||
list
|
||||
c
|
||||
list
|
||||
c
|
||||
c
|
||||
@@ -0,0 +1,22 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_pending_breakpoints.js:15
|
||||
(jerry-debugger) break :1
|
||||
No breakpoint found, do you want to add a pending breakpoint? (y or [n]) Pending breakpoint 1 at :1
|
||||
(jerry-debugger) break f
|
||||
No breakpoint found, do you want to add a pending breakpoint? (y or [n]) Pending breakpoint 2 at f()
|
||||
(jerry-debugger) list
|
||||
=== Pending breakpoints ===
|
||||
1: :1 (pending)
|
||||
2: f() (pending)
|
||||
(jerry-debugger) c
|
||||
out: pending-breakpoints
|
||||
Breakpoint 3 at <unknown>:1
|
||||
Breakpoint 4 at <unknown>:3 (in f() at line:2, col:1)
|
||||
Stopped at breakpoint:3 <unknown>:1
|
||||
(jerry-debugger) list
|
||||
=== Active breakpoints ===
|
||||
3: <unknown>:1
|
||||
4: <unknown>:3 (in f() at line:2, col:1)
|
||||
(jerry-debugger) c
|
||||
Stopped at breakpoint:4 <unknown>:3 (in f() at line:2, col:1)
|
||||
(jerry-debugger) c
|
||||
@@ -0,0 +1,21 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
print("pending-breakpoints");
|
||||
|
||||
eval("1;\nfunction f()\n{ return 5 }");
|
||||
|
||||
var bird = "colibri";
|
||||
f();
|
||||
var a = 234;
|
||||
@@ -0,0 +1 @@
|
||||
c
|
||||
@@ -0,0 +1,112 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_print.js:15
|
||||
(jerry-debugger) c
|
||||
out: Hello world!
|
||||
out: A [ ] 110 null true undefined
|
||||
out:
|
||||
out: [A
|
||||
out: B C
|
||||
out: D E
|
||||
out: F
|
||||
out: G]
|
||||
out: 1: Az élet gyönyörű.
|
||||
out: 2: Az élet gyönyörű.
|
||||
out: 3: Az élet gyönyörű.
|
||||
out: 4: Az élet gyönyörű.
|
||||
out: 5: Az élet gyönyörű.
|
||||
out: 6: Az élet gyönyörű.
|
||||
out: 7: Az élet gyönyörű.
|
||||
out: 8: Az élet gyönyörű.
|
||||
out: 9: Az élet gyönyörű.
|
||||
out: 10: Az élet gyönyörű.
|
||||
out: 11: Az élet gyönyörű.
|
||||
out: 12: Az élet gyönyörű.
|
||||
out: 13: Az élet gyönyörű.
|
||||
out: 14: Az élet gyönyörű.
|
||||
out: 15: Az élet gyönyörű.
|
||||
out: 16: Az élet gyönyörű.
|
||||
out: 17: Az élet gyönyörű.
|
||||
out: 18: Az élet gyönyörű.
|
||||
out: 19: Az élet gyönyörű.
|
||||
out: 20: Az élet gyönyörű.
|
||||
out: 21: Az élet gyönyörű.
|
||||
out: 22: Az élet gyönyörű.
|
||||
out: 23: Az élet gyönyörű.
|
||||
out: 24: Az élet gyönyörű.
|
||||
out: 25: Az élet gyönyörű.
|
||||
out: 26: Az élet gyönyörű.
|
||||
out: 27: Az élet gyönyörű.
|
||||
out: 28: Az élet gyönyörű.
|
||||
out: 29: Az élet gyönyörű.
|
||||
out: 30: Az élet gyönyörű.
|
||||
out: 31: Az élet gyönyörű.
|
||||
out: 32: Az élet gyönyörű.
|
||||
out: 33: Az élet gyönyörű.
|
||||
out: 34: Az élet gyönyörű.
|
||||
out: 35: Az élet gyönyörű.
|
||||
out: 36: Az élet gyönyörű.
|
||||
out: 37: Az élet gyönyörű.
|
||||
out: 38: Az élet gyönyörű.
|
||||
out: 39: Az élet gyönyörű.
|
||||
out: 40: Az élet gyönyörű.
|
||||
out: 41: Az élet gyönyörű.
|
||||
out: 42: Az élet gyönyörű.
|
||||
out: 43: Az élet gyönyörű.
|
||||
out: 44: Az élet gyönyörű.
|
||||
out: 45: Az élet gyönyörű.
|
||||
out: 46: Az élet gyönyörű.
|
||||
out: 47: Az élet gyönyörű.
|
||||
out: 48: Az élet gyönyörű.
|
||||
out: 49: Az élet gyönyörű.
|
||||
out: 50: Az élet gyönyörű.
|
||||
out: 51: Az élet gyönyörű.
|
||||
out: 52: Az élet gyönyörű.
|
||||
out: 53: Az élet gyönyörű.
|
||||
out: 54: Az élet gyönyörű.
|
||||
out: 55: Az élet gyönyörű.
|
||||
out: 56: Az élet gyönyörű.
|
||||
out: 57: Az élet gyönyörű.
|
||||
out: 58: Az élet gyönyörű.
|
||||
out: 59: Az élet gyönyörű.
|
||||
out: 60: Az élet gyönyörű.
|
||||
out: 61: Az élet gyönyörű.
|
||||
out: 62: Az élet gyönyörű.
|
||||
out: 63: Az élet gyönyörű.
|
||||
out: 64: Az élet gyönyörű.
|
||||
out: 65: Az élet gyönyörű.
|
||||
out: 66: Az élet gyönyörű.
|
||||
out: 67: Az élet gyönyörű.
|
||||
out: 68: Az élet gyönyörű.
|
||||
out: 69: Az élet gyönyörű.
|
||||
out: 70: Az élet gyönyörű.
|
||||
out: 71: Az élet gyönyörű.
|
||||
out: 72: Az élet gyönyörű.
|
||||
out: 73: Az élet gyönyörű.
|
||||
out: 74: Az élet gyönyörű.
|
||||
out: 75: Az élet gyönyörű.
|
||||
out: 76: Az élet gyönyörű.
|
||||
out: 77: Az élet gyönyörű.
|
||||
out: 78: Az élet gyönyörű.
|
||||
out: 79: Az élet gyönyörű.
|
||||
out: 80: Az élet gyönyörű.
|
||||
out: 81: Az élet gyönyörű.
|
||||
out: 82: Az élet gyönyörű.
|
||||
out: 83: Az élet gyönyörű.
|
||||
out: 84: Az élet gyönyörű.
|
||||
out: 85: Az élet gyönyörű.
|
||||
out: 86: Az élet gyönyörű.
|
||||
out: 87: Az élet gyönyörű.
|
||||
out: 88: Az élet gyönyörű.
|
||||
out: 89: Az élet gyönyörű.
|
||||
out: 90: Az élet gyönyörű.
|
||||
out: 91: Az élet gyönyörű.
|
||||
out: 92: Az élet gyönyörű.
|
||||
out: 93: Az élet gyönyörű.
|
||||
out: 94: Az élet gyönyörű.
|
||||
out: 95: Az élet gyönyörű.
|
||||
out: 96: Az élet gyönyörű.
|
||||
out: 97: Az élet gyönyörű.
|
||||
out: 98: Az élet gyönyörű.
|
||||
out: 99: Az élet gyönyörű.
|
||||
out: 100: Az élet gyönyörű.
|
||||
out:
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
print("Hello world!");
|
||||
print("A", "[", "", "]", 1.1e2, null, true, undefined);
|
||||
print();
|
||||
print("[A\nB", "C\nD", "E\nF\nG]");
|
||||
|
||||
var s = "";
|
||||
|
||||
for (i = 1; i <= 100; i++) {
|
||||
/* Translated from hungarian: life is beautiful */
|
||||
s += i + ": Az élet gyönyörű.\n";
|
||||
}
|
||||
|
||||
/* Long string with non-ascii characters. */
|
||||
print(s);
|
||||
@@ -0,0 +1 @@
|
||||
quit
|
||||
@@ -0,0 +1,3 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_quit.js:15
|
||||
(jerry-debugger) quit
|
||||
@@ -0,0 +1,41 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
print("quit test");
|
||||
|
||||
function func() {
|
||||
'use strict';
|
||||
'use stri' + 'ct';
|
||||
}
|
||||
|
||||
{
|
||||
{
|
||||
print("quit");
|
||||
}
|
||||
}
|
||||
|
||||
;
|
||||
;
|
||||
|
||||
var
|
||||
x =
|
||||
1,
|
||||
y =
|
||||
2
|
||||
|
||||
test = function
|
||||
(
|
||||
)
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
n
|
||||
n
|
||||
n
|
||||
restart
|
||||
@@ -0,0 +1,18 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_restart.js:23
|
||||
(jerry-debugger) n
|
||||
Stopped at tests/debugger/do_restart.js:24
|
||||
(jerry-debugger) n
|
||||
out: foo
|
||||
Stopped at tests/debugger/do_restart.js:25
|
||||
(jerry-debugger) n
|
||||
out: bar
|
||||
Stopped at tests/debugger/do_restart.js:24
|
||||
(jerry-debugger) restart
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_restart.js:23
|
||||
(jerry-debugger) continue
|
||||
out: foo
|
||||
out: bar
|
||||
out: foo
|
||||
out: bar
|
||||
@@ -0,0 +1,26 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
function foo() {
|
||||
print("foo");
|
||||
}
|
||||
|
||||
function bar() {
|
||||
print("bar");
|
||||
}
|
||||
|
||||
for (var i = 0; i < 2; i++) {
|
||||
foo();
|
||||
bar();
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
scope
|
||||
b do_scope.js:22
|
||||
c
|
||||
scope
|
||||
c
|
||||
scope
|
||||
b do_scope.js:28
|
||||
c
|
||||
scope
|
||||
b do_scope.js:31
|
||||
c
|
||||
scope
|
||||
b do_scope.js:33
|
||||
c
|
||||
scope
|
||||
b do_scope.js:35
|
||||
c
|
||||
scope
|
||||
c
|
||||
@@ -0,0 +1,63 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_scope.js:15
|
||||
(jerry-debugger) scope
|
||||
level | type
|
||||
0 | global
|
||||
(jerry-debugger) b do_scope.js:22
|
||||
Breakpoint 1 at tests/debugger/do_scope.js:22 (in f() at line:17, col:1)
|
||||
(jerry-debugger) c
|
||||
Exception throw detected (to disable automatic stop type exception 0)
|
||||
Exception hint: error
|
||||
Stopped at tests/debugger/do_scope.js:19 (in f() at line:17, col:1)
|
||||
(jerry-debugger) scope
|
||||
level | type
|
||||
0 | local
|
||||
1 | global
|
||||
(jerry-debugger) c
|
||||
Stopped at breakpoint:1 tests/debugger/do_scope.js:22 (in f() at line:17, col:1)
|
||||
(jerry-debugger) scope
|
||||
level | type
|
||||
0 | catch
|
||||
1 | local
|
||||
2 | global
|
||||
(jerry-debugger) b do_scope.js:28
|
||||
Breakpoint 2 at tests/debugger/do_scope.js:28 (in function() at line:27, col:4)
|
||||
(jerry-debugger) c
|
||||
Stopped at breakpoint:2 tests/debugger/do_scope.js:28 (in function() at line:27, col:4)
|
||||
(jerry-debugger) scope
|
||||
level | type
|
||||
0 | local
|
||||
1 | closure
|
||||
2 | global
|
||||
(jerry-debugger) b do_scope.js:31
|
||||
Breakpoint 3 at tests/debugger/do_scope.js:31 (in function() at line:27, col:4)
|
||||
(jerry-debugger) c
|
||||
Stopped at breakpoint:3 tests/debugger/do_scope.js:31 (in function() at line:27, col:4)
|
||||
(jerry-debugger) scope
|
||||
level | type
|
||||
0 | with
|
||||
1 | local
|
||||
2 | closure
|
||||
3 | global
|
||||
(jerry-debugger) b do_scope.js:33
|
||||
Breakpoint 4 at tests/debugger/do_scope.js:33 (in function() at line:27, col:4)
|
||||
(jerry-debugger) c
|
||||
Stopped at breakpoint:4 tests/debugger/do_scope.js:33 (in function() at line:27, col:4)
|
||||
(jerry-debugger) scope
|
||||
level | type
|
||||
0 | with
|
||||
1 | with
|
||||
2 | local
|
||||
3 | closure
|
||||
4 | global
|
||||
(jerry-debugger) b do_scope.js:35
|
||||
Breakpoint 5 at tests/debugger/do_scope.js:35 (in function() at line:27, col:4)
|
||||
(jerry-debugger) c
|
||||
Stopped at breakpoint:5 tests/debugger/do_scope.js:35 (in function() at line:27, col:4)
|
||||
(jerry-debugger) scope
|
||||
level | type
|
||||
0 | with
|
||||
1 | local
|
||||
2 | closure
|
||||
3 | global
|
||||
(jerry-debugger) c
|
||||
@@ -0,0 +1,41 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var c = 4;
|
||||
|
||||
function f() {
|
||||
try {
|
||||
throw "error";
|
||||
}
|
||||
catch (err) {
|
||||
var c = 10;
|
||||
}
|
||||
|
||||
var z = true;
|
||||
var g = 0;
|
||||
(function() {
|
||||
var a = [1,2,3]
|
||||
a.y = "abc";
|
||||
with (a) {
|
||||
var h = [4,5,6]
|
||||
with (h) {
|
||||
h.d = "dfg"
|
||||
}
|
||||
a.d = g + c;
|
||||
}
|
||||
})();
|
||||
}
|
||||
|
||||
f();
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
b f
|
||||
n
|
||||
next
|
||||
s
|
||||
source 0
|
||||
n
|
||||
step
|
||||
src
|
||||
c
|
||||
@@ -0,0 +1,23 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_src.js:19
|
||||
(jerry-debugger) b f
|
||||
Breakpoint 1 at tests/debugger/do_src.js:16 (in f() at line:15, col:1)
|
||||
(jerry-debugger) n
|
||||
Stopped at breakpoint:1 tests/debugger/do_src.js:16 (in f() at line:15, col:1)
|
||||
(jerry-debugger) next
|
||||
out: F1
|
||||
Stopped at tests/debugger/do_src.js:20
|
||||
(jerry-debugger) s
|
||||
Stopped at <unknown>:1
|
||||
(jerry-debugger) source 0
|
||||
1 > f = function f() {
|
||||
2 print('F2') }
|
||||
(jerry-debugger) n
|
||||
Stopped at tests/debugger/do_src.js:21
|
||||
(jerry-debugger) step
|
||||
Stopped at <unknown>:2 (in f() at line:1, col:5)
|
||||
(jerry-debugger) src
|
||||
1 f = function f() {
|
||||
2 > print('F2') }
|
||||
(jerry-debugger) c
|
||||
out: F2
|
||||
@@ -0,0 +1,21 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
function f() {
|
||||
print("F1");
|
||||
}
|
||||
|
||||
f();
|
||||
eval("f = function f() {\nprint('F2') }");
|
||||
f();
|
||||
@@ -0,0 +1,10 @@
|
||||
step
|
||||
step
|
||||
backtrace
|
||||
next
|
||||
bt
|
||||
next
|
||||
s
|
||||
n
|
||||
bt
|
||||
c
|
||||
@@ -0,0 +1,25 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_step.js:32
|
||||
(jerry-debugger) step
|
||||
Stopped at tests/debugger/do_step.js:22 (in f1() at line:15, col:1)
|
||||
(jerry-debugger) step
|
||||
Stopped at tests/debugger/do_step.js:19 (in g() at line:17, col:3)
|
||||
(jerry-debugger) backtrace
|
||||
Frame 0: tests/debugger/do_step.js:19 (in g() at line:17, col:3)
|
||||
Frame 1: tests/debugger/do_step.js:22 (in f1() at line:15, col:1)
|
||||
Frame 2: tests/debugger/do_step.js:32
|
||||
(jerry-debugger) next
|
||||
Stopped at tests/debugger/do_step.js:23 (in f1() at line:15, col:1)
|
||||
(jerry-debugger) bt
|
||||
Frame 0: tests/debugger/do_step.js:23 (in f1() at line:15, col:1)
|
||||
Frame 1: tests/debugger/do_step.js:32
|
||||
(jerry-debugger) next
|
||||
Stopped at tests/debugger/do_step.js:33
|
||||
(jerry-debugger) s
|
||||
Stopped at tests/debugger/do_step.js:28 (in f2() at line:26, col:1)
|
||||
(jerry-debugger) n
|
||||
Stopped at tests/debugger/do_step.js:29 (in f2() at line:26, col:1)
|
||||
(jerry-debugger) bt
|
||||
Frame 0: tests/debugger/do_step.js:29 (in f2() at line:26, col:1)
|
||||
Frame 1: tests/debugger/do_step.js:33
|
||||
(jerry-debugger) c
|
||||
@@ -0,0 +1,33 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
function f1()
|
||||
{
|
||||
function g()
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
|
||||
var i = g();
|
||||
g();
|
||||
}
|
||||
|
||||
function f2()
|
||||
{
|
||||
f1();
|
||||
return 7;
|
||||
}
|
||||
|
||||
f1();
|
||||
f2();
|
||||
@@ -0,0 +1,9 @@
|
||||
s
|
||||
s
|
||||
s
|
||||
s
|
||||
s
|
||||
throw new Error('Escape')
|
||||
throw new Error('Once upon a time there lived in a certain village a little country girl, the prettiest creature who was ever seen. Her mother was excessively fond of her; and her grandmother doted on her still more. This good woman had a little red riding hood made for her. It suited the girl so extremely well that everybody called her Little Red Riding Hood. One day her mother, having made some cakes, said to her, "Go, my dear, and see how your grandmother is doing, for I hear she has been very ill. Take her a cake, and this little pot of butter."')
|
||||
eval e.message.length
|
||||
throw new Error('Exit')
|
||||
@@ -0,0 +1,20 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_throw.js:23
|
||||
(jerry-debugger) s
|
||||
Stopped at tests/debugger/do_throw.js:24
|
||||
(jerry-debugger) s
|
||||
Stopped at tests/debugger/do_throw.js:26
|
||||
(jerry-debugger) s
|
||||
Stopped at tests/debugger/do_throw.js:27
|
||||
(jerry-debugger) s
|
||||
Stopped at tests/debugger/do_throw.js:20 (in g() at line:19, col:1)
|
||||
(jerry-debugger) s
|
||||
Stopped at tests/debugger/do_throw.js:16 (in f() at line:15, col:1)
|
||||
(jerry-debugger) throw new Error('Escape')
|
||||
Stopped at tests/debugger/do_throw.js:31
|
||||
(jerry-debugger) throw new Error('Once upon a time there lived in a certain village a little country girl, the prettiest creature who was ever seen. Her mother was excessively fond of her; and her grandmother doted on her still more. This good woman had a little red riding hood made for her. It suited the girl so extremely well that everybody called her Little Red Riding Hood. One day her mother, having made some cakes, said to her, "Go, my dear, and see how your grandmother is doing, for I hear she has been very ill. Take her a cake, and this little pot of butter."')
|
||||
Stopped at tests/debugger/do_throw.js:34
|
||||
(jerry-debugger) eval e.message.length
|
||||
538
|
||||
(jerry-debugger) throw new Error('Exit')
|
||||
err: Error: Exit
|
||||
@@ -0,0 +1,35 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
function f() {
|
||||
return 32;
|
||||
}
|
||||
|
||||
function g() {
|
||||
f();
|
||||
}
|
||||
|
||||
try {
|
||||
try {
|
||||
|
||||
while (true) {
|
||||
g();
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
var s = "Stop here";
|
||||
}
|
||||
} catch (e) {
|
||||
var s = "Stop here again";
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
c
|
||||
s
|
||||
c
|
||||
c
|
||||
c
|
||||
c
|
||||
c
|
||||
c
|
||||
c
|
||||
c
|
||||
c
|
||||
@@ -0,0 +1,42 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_throw_adv.js:15
|
||||
(jerry-debugger) c
|
||||
Exception throw detected (to disable automatic stop type exception 0)
|
||||
Exception hint: 2
|
||||
Stopped at tests/debugger/do_throw_adv.js:18 (in f() at line:17, col:1)
|
||||
(jerry-debugger) s
|
||||
Stopped at tests/debugger/do_throw_adv.js:32
|
||||
(jerry-debugger) c
|
||||
Exception throw detected (to disable automatic stop type exception 0)
|
||||
Exception hint: 4
|
||||
Stopped at tests/debugger/do_throw_adv.js:18 (in f() at line:17, col:1)
|
||||
(jerry-debugger) c
|
||||
Exception throw detected (to disable automatic stop type exception 0)
|
||||
Exception hint: Catch again
|
||||
Stopped at tests/debugger/do_throw_adv.js:41
|
||||
(jerry-debugger) c
|
||||
Exception throw detected (to disable automatic stop type exception 0)
|
||||
Exception hint: 7
|
||||
Stopped at tests/debugger/do_throw_adv.js:18 (in f() at line:17, col:1)
|
||||
(jerry-debugger) c
|
||||
Exception throw detected (to disable automatic stop type exception 0)
|
||||
Exception hint: 10
|
||||
Stopped at tests/debugger/do_throw_adv.js:18 (in f() at line:17, col:1)
|
||||
(jerry-debugger) c
|
||||
Exception throw detected (to disable automatic stop type exception 0)
|
||||
Exception hint: Replace the other error
|
||||
Stopped at tests/debugger/do_throw_adv.js:63
|
||||
(jerry-debugger) c
|
||||
Exception throw detected (to disable automatic stop type exception 0)
|
||||
Exception hint: 13
|
||||
Stopped at tests/debugger/do_throw_adv.js:18 (in f() at line:17, col:1)
|
||||
(jerry-debugger) c
|
||||
Exception throw detected (to disable automatic stop type exception 0)
|
||||
Exception hint: Should be caught
|
||||
Stopped at tests/debugger/do_throw_adv.js:76
|
||||
(jerry-debugger) c
|
||||
Exception throw detected (to disable automatic stop type exception 0)
|
||||
Exception hint: 16
|
||||
Stopped at tests/debugger/do_throw_adv.js:18 (in f() at line:17, col:1)
|
||||
(jerry-debugger) c
|
||||
err: 16
|
||||
@@ -0,0 +1,81 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = 1;
|
||||
|
||||
function f() {
|
||||
throw ++a;
|
||||
}
|
||||
|
||||
function g() {
|
||||
f();
|
||||
}
|
||||
|
||||
function h() {
|
||||
g();
|
||||
}
|
||||
|
||||
try {
|
||||
h();
|
||||
} catch (e) {
|
||||
++a;
|
||||
}
|
||||
|
||||
try {
|
||||
h();
|
||||
} catch (e) {
|
||||
++a;
|
||||
|
||||
try {
|
||||
throw "Catch again";
|
||||
} catch (e) {
|
||||
++a;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
try {
|
||||
h();
|
||||
} finally {
|
||||
++a;
|
||||
}
|
||||
++a; /* Should not happen. */
|
||||
} catch (e) {
|
||||
++a;
|
||||
}
|
||||
|
||||
try {
|
||||
try {
|
||||
h();
|
||||
} finally {
|
||||
++a;
|
||||
throw "Replace the other error";
|
||||
}
|
||||
} catch (e) {
|
||||
++a;
|
||||
}
|
||||
|
||||
try {
|
||||
break_try_label: try {
|
||||
h();
|
||||
} finally {
|
||||
++a;
|
||||
break break_try_label;
|
||||
}
|
||||
throw "Should be caught";
|
||||
} catch (e) {
|
||||
++a;
|
||||
}
|
||||
|
||||
h();
|
||||
@@ -0,0 +1,28 @@
|
||||
scope
|
||||
variables
|
||||
variables 1
|
||||
variables 0
|
||||
b tests/debugger/do_variables.js:20
|
||||
c
|
||||
scope
|
||||
variables 0
|
||||
variables 1
|
||||
variables 2
|
||||
b tests/debugger/do_variables.js:30
|
||||
c
|
||||
scope
|
||||
variables 1
|
||||
variables 0
|
||||
b tests/debugger/do_variables.js:33
|
||||
c
|
||||
c
|
||||
scope
|
||||
variables 0
|
||||
variables 1
|
||||
b tests/debugger/do_variables.js:50
|
||||
c
|
||||
scope
|
||||
variables 0
|
||||
variables 1
|
||||
variables 2
|
||||
c
|
||||
@@ -0,0 +1,136 @@
|
||||
Connecting to: localhost:5001
|
||||
Stopped at tests/debugger/do_variables.js:15
|
||||
(jerry-debugger) scope
|
||||
level | type
|
||||
0 | global
|
||||
(jerry-debugger) variables
|
||||
name | type | value
|
||||
f | Function |
|
||||
addX | Function |
|
||||
z | undefined | undefined
|
||||
c | undefined | undefined
|
||||
createRealm | Function |
|
||||
resourceName | Function |
|
||||
print | Function |
|
||||
gc | Function |
|
||||
assert | Function |
|
||||
(jerry-debugger) variables 1
|
||||
name | type | value
|
||||
(jerry-debugger) variables 0
|
||||
name | type | value
|
||||
f | Function |
|
||||
addX | Function |
|
||||
z | undefined | undefined
|
||||
c | undefined | undefined
|
||||
createRealm | Function |
|
||||
resourceName | Function |
|
||||
print | Function |
|
||||
gc | Function |
|
||||
assert | Function |
|
||||
(jerry-debugger) b tests/debugger/do_variables.js:20
|
||||
Breakpoint 1 at tests/debugger/do_variables.js:20 (in function() at line:19, col:10)
|
||||
(jerry-debugger) c
|
||||
Stopped at breakpoint:1 tests/debugger/do_variables.js:20 (in function() at line:19, col:10)
|
||||
(jerry-debugger) scope
|
||||
level | type
|
||||
0 | local
|
||||
1 | closure
|
||||
2 | global
|
||||
(jerry-debugger) variables 0
|
||||
name | type | value
|
||||
b | undefined | undefined
|
||||
n | Number | 9
|
||||
(jerry-debugger) variables 1
|
||||
name | type | value
|
||||
x | Number | 3
|
||||
(jerry-debugger) variables 2
|
||||
name | type | value
|
||||
addThree | Function |
|
||||
f | Function |
|
||||
addX | Function |
|
||||
z | Number | 5
|
||||
c | Number | 4
|
||||
createRealm | Function |
|
||||
resourceName | Function |
|
||||
print | Function |
|
||||
gc | Function |
|
||||
assert | Function |
|
||||
(jerry-debugger) b tests/debugger/do_variables.js:30
|
||||
Breakpoint 2 at tests/debugger/do_variables.js:30 (in f() at line:28, col:1)
|
||||
(jerry-debugger) c
|
||||
Stopped at breakpoint:2 tests/debugger/do_variables.js:30 (in f() at line:28, col:1)
|
||||
(jerry-debugger) scope
|
||||
level | type
|
||||
0 | local
|
||||
1 | global
|
||||
(jerry-debugger) variables 1
|
||||
name | type | value
|
||||
d | Number | 12
|
||||
addThree | Function |
|
||||
f | Function |
|
||||
addX | Function |
|
||||
z | Number | 5
|
||||
c | Number | 4
|
||||
createRealm | Function |
|
||||
resourceName | Function |
|
||||
print | Function |
|
||||
gc | Function |
|
||||
assert | Function |
|
||||
(jerry-debugger) variables 0
|
||||
name | type | value
|
||||
b | undefined | undefined
|
||||
x | undefined | undefined
|
||||
user | undefined | undefined
|
||||
m | undefined | undefined
|
||||
c | undefined | undefined
|
||||
(jerry-debugger) b tests/debugger/do_variables.js:33
|
||||
Breakpoint 3 at tests/debugger/do_variables.js:33 (in f() at line:28, col:1)
|
||||
(jerry-debugger) c
|
||||
Exception throw detected (to disable automatic stop type exception 0)
|
||||
Exception hint: error
|
||||
Stopped at breakpoint:2 tests/debugger/do_variables.js:30 (in f() at line:28, col:1)
|
||||
(jerry-debugger) c
|
||||
Stopped at breakpoint:3 tests/debugger/do_variables.js:33 (in f() at line:28, col:1)
|
||||
(jerry-debugger) scope
|
||||
level | type
|
||||
0 | catch
|
||||
1 | local
|
||||
2 | global
|
||||
(jerry-debugger) variables 0
|
||||
name | type | value
|
||||
err | String | error
|
||||
(jerry-debugger) variables 1
|
||||
name | type | value
|
||||
b | undefined | undefined
|
||||
x | undefined | undefined
|
||||
user | undefined | undefined
|
||||
m | undefined | undefined
|
||||
c | undefined | undefined
|
||||
(jerry-debugger) b tests/debugger/do_variables.js:50
|
||||
Breakpoint 4 at tests/debugger/do_variables.js:50 (in function() at line:46, col:4)
|
||||
(jerry-debugger) c
|
||||
Stopped at breakpoint:4 tests/debugger/do_variables.js:50 (in function() at line:46, col:4)
|
||||
(jerry-debugger) scope
|
||||
level | type
|
||||
0 | with
|
||||
1 | local
|
||||
2 | closure
|
||||
3 | global
|
||||
(jerry-debugger) variables 0
|
||||
name | type | value
|
||||
y | String | abc
|
||||
0 | Number | 1
|
||||
1 | Number | 2
|
||||
2 | Number | 3
|
||||
(jerry-debugger) variables 1
|
||||
name | type | value
|
||||
h | undefined | undefined
|
||||
a | Array | [1,2,3]
|
||||
(jerry-debugger) variables 2
|
||||
name | type | value
|
||||
b | Number | 10
|
||||
x | Boolean | true
|
||||
user | Object | [object Object]
|
||||
m | Null | null
|
||||
c | Number | 10
|
||||
(jerry-debugger) c
|
||||
@@ -0,0 +1,60 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var c = 4;
|
||||
var z = 5;
|
||||
|
||||
function addX(x) {
|
||||
return function(n) {
|
||||
var b = 2;
|
||||
return n + x;
|
||||
}
|
||||
}
|
||||
|
||||
addThree = addX(3);
|
||||
d = addThree(c+z);
|
||||
|
||||
function f() {
|
||||
try {
|
||||
throw "error";
|
||||
}
|
||||
catch (err) {
|
||||
var c = 10;
|
||||
}
|
||||
|
||||
var m = null;
|
||||
|
||||
var user = {
|
||||
name: "John",
|
||||
age: 30
|
||||
};
|
||||
|
||||
var x = true;
|
||||
var b = 10;
|
||||
|
||||
(function() {
|
||||
var a = [1,2,3]
|
||||
a.y = "abc";
|
||||
with (a) {
|
||||
var h = [4,5,6]
|
||||
with (h) {
|
||||
h.d = "dfg"
|
||||
}
|
||||
a.d = x;
|
||||
}
|
||||
})();
|
||||
}
|
||||
|
||||
f();
|
||||
|
||||
Reference in New Issue
Block a user