xref: /vim-8.2.3635/runtime/doc/debugger.txt (revision a6c27c47)
1*debugger.txt*  For Vim version 8.1.  Last change: 2019 May 05
2
3
4		  VIM REFERENCE MANUAL    by Gordon Prieur
5
6
7Debugger Support Features				*debugger-support*
8
91. Debugger Features		|debugger-features|
102. Vim Compile Options		|debugger-compilation|
113. Integrated Debuggers		|debugger-integration|
12
13
14==============================================================================
151. Debugger Features					*debugger-features*
16
17The following features are available for an integration with a debugger or
18an Integrated Programming Environment (IPE) or Integrated Development
19Environment (IDE):
20
21	Alternate Command Input				|alt-input|
22	Debug Signs					|debug-signs|
23	Debug Source Highlight				|debug-highlight|
24	Message Footer					|gui-footer|
25	Balloon Evaluation				|balloon-eval|
26
27These features were added specifically for use in the Motif version of gvim.
28However, the |alt-input| and |debug-highlight| were written to be usable in
29both vim and gvim.  Some of the other features could be used in the non-GUI
30vim with slight modifications.  However, I did not do this nor did I test the
31reliability of building for vim or non Motif GUI versions.
32
33
341.1 Alternate Command Input				*alt-input*
35
36For Vim to work with a debugger there must be at least an input connection
37with a debugger or external tool.  In many cases there will also be an output
38connection but this isn't absolutely necessary.
39
40The purpose of the input connection is to let the external debugger send
41commands to Vim.  The commands sent by the debugger should give the debugger
42enough control to display the current debug environment and state.
43
44The current implementation is based on the X Toolkit dispatch loop and the
45XtAddInput() function call.
46
47
481.2 Debug Signs						*debug-signs*
49
50Many debuggers mark specific lines by placing a small sign or color highlight
51on the line.  The |:sign| command lets the debugger set this graphic mark.  Some
52examples where this feature would be used would be a debugger showing an arrow
53representing the Program Counter (PC) of the program being debugged.  Another
54example would be a small stop sign for a line with a breakpoint.  These visible
55highlights let the user keep track of certain parts of the state of the
56debugger.
57
58This feature can be used with more than debuggers, too.  An IPE can use a sign
59to highlight build errors, searched text, or other things.  The sign feature
60can also work together with the |debug-highlight| to ensure the mark is
61highly visible.
62
63Debug signs are defined and placed using the |:sign| command.
64
65
661.3 Debug Source Highlight				*debug-highlight*
67
68This feature allows a line to have a predominant highlight.  The highlight is
69intended to make a specific line stand out.  The highlight could be made to
70work for both vim and gvim, whereas the debug sign is, in most cases, limited
71to gvim.  The one exception to this is Sun Microsystem's dtterm.  The dtterm
72from Sun has a "sign gutter" for showing signs.
73
74
751.4 Message Footer					*gui-footer*
76
77The message footer can be used to display messages from a debugger or IPE.  It
78can also be used to display menu and toolbar tips.  The footer area is at the
79bottom of the GUI window, below the line used to display colon commands.
80
81The display of the footer is controlled by the 'guioptions' letter 'F'.
82
83
841.5 Balloon Evaluation					*balloon-eval*
85
86This feature allows a debugger, or other external tool, to display dynamic
87information based on where the mouse is pointing.  The purpose of this feature
88was to allow Sun's Visual WorkShop debugger to display expression evaluations.
89However, the feature was implemented in as general a manner as possible and
90could be used for displaying other information as well.
91
92The Balloon Evaluation has some settable parameters too.  For Motif the font
93list and colors can be set via X resources (XmNballoonEvalFontList,
94XmNballoonEvalBackground, and XmNballoonEvalForeground).
95The 'balloondelay' option sets the delay before an attempt is made to show a
96balloon.
97The 'ballooneval' and/or the 'balloonevalterm' option needs to be set to
98switch it on.
99
100Balloon evaluation is only available in the GUI when compiled with the
101|+balloon_eval| feature.  For the terminal the  |+balloon_eval_term| feature
102matters.
103
104The Balloon evaluation functions are also used to show a tooltip for the
105toolbar.  The 'ballooneval' option does not need to be set for this.  But the
106other settings apply.
107
108Another way to use the balloon is with the 'balloonexpr' option.  This is
109completely user definable.
110
111==============================================================================
1122. Vim Compile Options					*debugger-compilation*
113
114The debugger features were added explicitly for use with Sun's Visual
115WorkShop Integrated Programming Environment (ipe).  However, they were done
116in as generic a manner as possible so that integration with other debuggers
117could also use some or all of the tools used with Sun's ipe.
118
119The following compile time preprocessor variables control the features:
120
121    Alternate Command Input			ALT_X_INPUT
122    Debug Glyphs				FEAT_SIGNS
123    Debug Highlights				FEAT_SIGNS
124    Message Footer				FEAT_FOOTER
125    Balloon Evaluation				FEAT_BEVAL
126
127The first integration with a full IPE/IDE was with Sun Visual WorkShop.  To
128compile a gvim which interfaces with VWS set the following flag, which sets
129all the above flags:
130
131    Sun Visual WorkShop				FEAT_SUN_WORKSHOP
132
133==============================================================================
1343. Integrated Debuggers					*debugger-integration*
135
136One fully integrated debugger/IPE/IDE is Sun's Visual WorkShop Integrated
137Programming Environment.
138
139For Sun NetBeans support see |netbeans|.
140
141 vim:tw=78:sw=4:ts=8:noet:ft=help:norl:
142