annotate runtime/doc/debugger.txt @ 15077:cd6daebf47ae v8.1.0549

patch 8.1.0549: netbeans test depends on README.txt contents commit https://github.com/vim/vim/commit/10efcd5b0259659cd9a152a7a342deb5d56a8eb5 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Nov 26 21:22:07 2018 +0100 patch 8.1.0549: netbeans test depends on README.txt contents Problem: Netbeans test depends on README.txt contents. Solution: Use a generated file instead.
author Bram Moolenaar <Bram@vim.org>
date Mon, 26 Nov 2018 21:30:08 +0100
parents 2f7e67dd088c
children 0e473e9e70c2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13963
1174611ad715 Vim 8.1 release
Christian Brabandt <cb@256bit.org>
parents: 12909
diff changeset
1 *debugger.txt* For Vim version 8.1. Last change: 2017 Nov 21
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 VIM REFERENCE MANUAL by Gordon Prieur
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 Debugger Support Features *debugger-support*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 1. Debugger Features |debugger-features|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 2. Vim Compile Options |debugger-compilation|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 3. Integrated Debuggers |debugger-integration|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 {Vi does not have any of these features}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 1. Debugger Features *debugger-features*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 The following features are available for an integration with a debugger or
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 an Integrated Programming Environment (IPE) or Integrated Development
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 Environment (IDE):
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 Alternate Command Input |alt-input|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 Debug Signs |debug-signs|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 Debug Source Highlight |debug-highlight|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 Message Footer |gui-footer|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 Balloon Evaluation |balloon-eval|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 These features were added specifically for use in the Motif version of gvim.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 However, the |alt-input| and |debug-highlight| were written to be usable in
236
4707450c2b33 updated for version 7.0066
vimboss
parents: 188
diff changeset
30 both vim and gvim. Some of the other features could be used in the non-GUI
4707450c2b33 updated for version 7.0066
vimboss
parents: 188
diff changeset
31 vim with slight modifications. However, I did not do this nor did I test the
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 reliability of building for vim or non Motif GUI versions.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 1.1 Alternate Command Input *alt-input*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 For Vim to work with a debugger there must be at least an input connection
236
4707450c2b33 updated for version 7.0066
vimboss
parents: 188
diff changeset
38 with a debugger or external tool. In many cases there will also be an output
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 connection but this isn't absolutely necessary.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 The purpose of the input connection is to let the external debugger send
236
4707450c2b33 updated for version 7.0066
vimboss
parents: 188
diff changeset
42 commands to Vim. The commands sent by the debugger should give the debugger
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 enough control to display the current debug environment and state.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 The current implementation is based on the X Toolkit dispatch loop and the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 XtAddInput() function call.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 1.2 Debug Signs *debug-signs*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 Many debuggers mark specific lines by placing a small sign or color highlight
236
4707450c2b33 updated for version 7.0066
vimboss
parents: 188
diff changeset
52 on the line. The |:sign| command lets the debugger set this graphic mark. Some
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 examples where this feature would be used would be a debugger showing an arrow
236
4707450c2b33 updated for version 7.0066
vimboss
parents: 188
diff changeset
54 representing the Program Counter (PC) of the program being debugged. Another
4707450c2b33 updated for version 7.0066
vimboss
parents: 188
diff changeset
55 example would be a small stop sign for a line with a breakpoint. These visible
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 highlights let the user keep track of certain parts of the state of the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 debugger.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58
236
4707450c2b33 updated for version 7.0066
vimboss
parents: 188
diff changeset
59 This feature can be used with more than debuggers, too. An IPE can use a sign
4707450c2b33 updated for version 7.0066
vimboss
parents: 188
diff changeset
60 to highlight build errors, searched text, or other things. The sign feature
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 can also work together with the |debug-highlight| to ensure the mark is
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 highly visible.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 Debug signs are defined and placed using the |:sign| command.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 1.3 Debug Source Highlight *debug-highlight*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68
236
4707450c2b33 updated for version 7.0066
vimboss
parents: 188
diff changeset
69 This feature allows a line to have a predominant highlight. The highlight is
4707450c2b33 updated for version 7.0066
vimboss
parents: 188
diff changeset
70 intended to make a specific line stand out. The highlight could be made to
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 work for both vim and gvim, whereas the debug sign is, in most cases, limited
236
4707450c2b33 updated for version 7.0066
vimboss
parents: 188
diff changeset
72 to gvim. The one exception to this is Sun Microsystem's dtterm. The dtterm
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 from Sun has a "sign gutter" for showing signs.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 1.4 Message Footer *gui-footer*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
236
4707450c2b33 updated for version 7.0066
vimboss
parents: 188
diff changeset
78 The message footer can be used to display messages from a debugger or IPE. It
4707450c2b33 updated for version 7.0066
vimboss
parents: 188
diff changeset
79 can also be used to display menu and toolbar tips. The footer area is at the
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 bottom of the GUI window, below the line used to display colon commands.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 The display of the footer is controlled by the 'guioptions' letter 'F'.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 1.5 Balloon Evaluation *balloon-eval*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 This feature allows a debugger, or other external tool, to display dynamic
236
4707450c2b33 updated for version 7.0066
vimboss
parents: 188
diff changeset
88 information based on where the mouse is pointing. The purpose of this feature
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 was to allow Sun's Visual WorkShop debugger to display expression evaluations.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 However, the feature was implemented in as general a manner as possible and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 could be used for displaying other information as well.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92
170
8c60f65311fa updated for version 7.0052
vimboss
parents: 147
diff changeset
93 The Balloon Evaluation has some settable parameters too. For Motif the font
8c60f65311fa updated for version 7.0052
vimboss
parents: 147
diff changeset
94 list and colors can be set via X resources (XmNballoonEvalFontList,
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 XmNballoonEvalBackground, and XmNballoonEvalForeground).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 The 'balloondelay' option sets the delay before an attempt is made to show a
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 balloon.
12909
1578c0ba0dd1 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
98 The 'ballooneval' and/or the 'balloonevalterm' option needs to be set to
1578c0ba0dd1 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
99 switch it on.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100
12909
1578c0ba0dd1 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
101 Balloon evaluation is only available in the GUI when compiled with the
1578c0ba0dd1 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
102 |+balloon_eval| feature. For the terminal the |+balloon_eval_term| feature
1578c0ba0dd1 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
103 matters.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 The Balloon evaluation functions are also used to show a tooltip for the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 toolbar. The 'ballooneval' option does not need to be set for this. But the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 other settings apply.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108
188
041a413d626d updated for version 7.0057
vimboss
parents: 170
diff changeset
109 Another way to use the balloon is with the 'balloonexpr' option. This is
041a413d626d updated for version 7.0057
vimboss
parents: 170
diff changeset
110 completely user definable.
041a413d626d updated for version 7.0057
vimboss
parents: 170
diff changeset
111
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 2. Vim Compile Options *debugger-compilation*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 The debugger features were added explicitly for use with Sun's Visual
236
4707450c2b33 updated for version 7.0066
vimboss
parents: 188
diff changeset
116 WorkShop Integrated Programming Environment (ipe). However, they were done
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 in as generic a manner as possible so that integration with other debuggers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 could also use some or all of the tools used with Sun's ipe.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 The following compile time preprocessor variables control the features:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 Alternate Command Input ALT_X_INPUT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 Debug Glyphs FEAT_SIGNS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 Debug Highlights FEAT_SIGNS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 Message Footer FEAT_FOOTER
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 Balloon Evaluation FEAT_BEVAL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127
236
4707450c2b33 updated for version 7.0066
vimboss
parents: 188
diff changeset
128 The first integration with a full IPE/IDE was with Sun Visual WorkShop. To
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 compile a gvim which interfaces with VWS set the following flag, which sets
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 all the above flags:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 Sun Visual WorkShop FEAT_SUN_WORKSHOP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 3. Integrated Debuggers *debugger-integration*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136
147
2f5a3b881ada updated for version 7.0046
vimboss
parents: 7
diff changeset
137 One fully integrated debugger/IPE/IDE is Sun's Visual WorkShop Integrated
2f5a3b881ada updated for version 7.0046
vimboss
parents: 7
diff changeset
138 Programming Environment.
2f5a3b881ada updated for version 7.0046
vimboss
parents: 7
diff changeset
139
2f5a3b881ada updated for version 7.0046
vimboss
parents: 7
diff changeset
140 For Sun NetBeans support see |netbeans|.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141
14421
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13963
diff changeset
142 vim:tw=78:sw=4:ts=8:noet:ft=help:norl: