blob: 47c017db2c4c7e1f298e2ccb7c519ea018ab94d8 [file] [log] [blame]
Bram Moolenaar5666fcd2019-12-26 14:35:26 +01001*debugger.txt* For Vim version 8.2. Last change: 2019 Dec 21
Bram Moolenaar071d4272004-06-13 20:20:40 +00002
3
4 VIM REFERENCE MANUAL by Gordon Prieur
5
6
7Debugger Support Features *debugger-support*
8
Bram Moolenaar396e8292019-07-13 23:04:31 +02009These features are for integration with a debugger or an Integrated
10Programming Environment (IPE) or Integrated Development Environment (IDE).
11For the debugger running in a Vim terminal window see |terminal-debugger|.
12
Bram Moolenaar071d4272004-06-13 20:20:40 +0000131. Debugger Features |debugger-features|
142. Vim Compile Options |debugger-compilation|
Bram Moolenaar071d4272004-06-13 20:20:40 +000015
16==============================================================================
171. Debugger Features *debugger-features*
18
Bram Moolenaar396e8292019-07-13 23:04:31 +020019The following features are available:
Bram Moolenaar071d4272004-06-13 20:20:40 +000020
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
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000029both 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
Bram Moolenaar071d4272004-06-13 20:20:40 +000031reliability 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
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000037with a debugger or external tool. In many cases there will also be an output
Bram Moolenaar071d4272004-06-13 20:20:40 +000038connection but this isn't absolutely necessary.
39
40The purpose of the input connection is to let the external debugger send
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000041commands to Vim. The commands sent by the debugger should give the debugger
Bram Moolenaar071d4272004-06-13 20:20:40 +000042enough 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
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000051on the line. The |:sign| command lets the debugger set this graphic mark. Some
Bram Moolenaar071d4272004-06-13 20:20:40 +000052examples where this feature would be used would be a debugger showing an arrow
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000053representing 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
Bram Moolenaar071d4272004-06-13 20:20:40 +000055highlights let the user keep track of certain parts of the state of the
56debugger.
57
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000058This 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
Bram Moolenaar071d4272004-06-13 20:20:40 +000060can 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
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000068This 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
Bram Moolenaar071d4272004-06-13 20:20:40 +000070work for both vim and gvim, whereas the debug sign is, in most cases, limited
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000071to gvim. The one exception to this is Sun Microsystem's dtterm. The dtterm
Bram Moolenaar071d4272004-06-13 20:20:40 +000072from Sun has a "sign gutter" for showing signs.
73
74
751.4 Message Footer *gui-footer*
76
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000077The 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
Bram Moolenaar071d4272004-06-13 20:20:40 +000079bottom 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
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000087information based on where the mouse is pointing. The purpose of this feature
Bram Moolenaar071d4272004-06-13 20:20:40 +000088was to allow Sun's Visual WorkShop debugger to display expression evaluations.
89However, the feature was implemented in as general a manner as possible and
Bram Moolenaar68e65602019-05-26 21:33:31 +020090could be used for displaying other information as well. The functionality is
91limited though, for advanced popups see |popup-window|.
Bram Moolenaar071d4272004-06-13 20:20:40 +000092
Bram Moolenaar396e8292019-07-13 23:04:31 +020093Another way to use the balloon is with the 'balloonexpr' option. This is
94completely user definable.
95
Bram Moolenaar05159a02005-02-26 23:04:13 +000096The Balloon Evaluation has some settable parameters too. For Motif the font
97list and colors can be set via X resources (XmNballoonEvalFontList,
Bram Moolenaar071d4272004-06-13 20:20:40 +000098XmNballoonEvalBackground, and XmNballoonEvalForeground).
99The 'balloondelay' option sets the delay before an attempt is made to show a
100balloon.
Bram Moolenaara2a80162017-11-21 23:09:50 +0100101The 'ballooneval' and/or the 'balloonevalterm' option needs to be set to
102switch it on.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000103
Bram Moolenaara2a80162017-11-21 23:09:50 +0100104Balloon evaluation is only available in the GUI when compiled with the
105|+balloon_eval| feature. For the terminal the |+balloon_eval_term| feature
106matters.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000107
108The Balloon evaluation functions are also used to show a tooltip for the
109toolbar. The 'ballooneval' option does not need to be set for this. But the
110other settings apply.
111
112==============================================================================
1132. Vim Compile Options *debugger-compilation*
114
Bram Moolenaar5666fcd2019-12-26 14:35:26 +0100115The debugger features were added for use with Sun's Visual WorkShop Integrated
116Programming Environment (ipe). However, they were done in as generic a manner
117as possible so that integration with other debuggers could also these
118features.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000119
120The following compile time preprocessor variables control the features:
121
122 Alternate Command Input ALT_X_INPUT
123 Debug Glyphs FEAT_SIGNS
124 Debug Highlights FEAT_SIGNS
125 Message Footer FEAT_FOOTER
126 Balloon Evaluation FEAT_BEVAL
127
Bram Moolenaar5666fcd2019-12-26 14:35:26 +0100128The support specifically for Sun Visual WorkShop has been removed, since the
129product no longer exists.
Bram Moolenaarb23c3382005-01-31 19:09:12 +0000130
131For Sun NetBeans support see |netbeans|.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000132
Bram Moolenaar5666fcd2019-12-26 14:35:26 +0100133
Bram Moolenaar91f84f62018-07-29 15:07:52 +0200134 vim:tw=78:sw=4:ts=8:noet:ft=help:norl: