comparison src/testdir/test108.ok @ 7605:8fc60af6dbf5 v7.4.1102

commit https://github.com/vim/vim/commit/f1f60f859cdbb2638b3662ccf7b1d179865fe7dc Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 16 15:40:53 2016 +0100 patch 7.4.1102 Problem: Debugger has no stack backtrace support. Solution: Add "backtrace", "frame", "up" and "down" commands. (Alberto Fanjul, closes https://github.com/vim/vim/issues/433)
author Christian Brabandt <cb@256bit.org>
date Sat, 16 Jan 2016 15:45:04 +0100
parents
children a527110d5f56
comparison
equal deleted inserted replaced
7604:09a1aca8d980 7605:8fc60af6dbf5
1
2
3
4 - show backtrace:
5
6 2 function Foo[2]
7 1 Bar[2]
8 ->0 Bazz
9 line 2: let var3 = "another var"
10
11 show variables on different levels:
12
13 6
14 2 function Foo[2]
15 ->1 Bar[2]
16 0 Bazz
17 line 2: let var3 = "another var"
18 3
19 ->2 function Foo[2]
20 1 Bar[2]
21 0 Bazz
22 line 2: let var3 = "another var"
23 1
24
25 - undefined vars:
26
27 undefined var3 on former level:
28 Error detected while processing function Foo[2]..Bar[2]..Bazz:
29 line 3:
30 E121: Undefined variable: var3
31 E15: Invalid expression: var3
32 here var3 is defined with "another var":
33 another var
34
35 undefined var2 on former level
36 Error detected while processing function Foo[2]..Bar:
37 line 3:
38 E121: Undefined variable: var2
39 E15: Invalid expression: var2
40 here var2 is defined with 10:
41 10
42
43 - backtrace movements:
44
45 1 function Foo[2]
46 ->0 Bar
47 line 3: End of function
48
49 next command cannot go down, we are on bottom
50
51 frame is zero
52
53 next command cannot go up, we are on top
54
55 frame at highest level: 1
56 ->1 function Foo[2]
57 0 Bar
58 line 3: End of function
59 fil is not frame or finish, it is file
60 "[No Name]" --No lines in buffer--
61
62 - relative backtrace movement
63
64 1 function Foo[2]
65 ->0 Bar
66 line 3: End of function
67 ->1 function Foo[2]
68 0 Bar
69 line 3: End of function
70
71 - go beyond limits does not crash
72
73 frame at highest level: 1
74 ->1 function Foo[2]
75 0 Bar
76 line 3: End of function
77 frame is zero
78 1 function Foo[2]
79 ->0 Bar
80 line 3: End of function
81
82 - final result 19:
83 19
84