blob: 51a9cc9fcf2abaddbf797c2f9331ccf522f702f6 [file] [log] [blame]
Bram Moolenaarbb76f242016-09-12 14:24:39 +02001*debugger.txt* For Vim version 8.0. Last change: 2005 Mar 29
Bram Moolenaar071d4272004-06-13 20:20:40 +00002
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{Vi does not have any of these features}
14
15==============================================================================
161. Debugger Features *debugger-features*
17
18The following features are available for an integration with a debugger or
19an Integrated Programming Environment (IPE) or Integrated Development
20Environment (IDE):
21
22 Alternate Command Input |alt-input|
23 Debug Signs |debug-signs|
24 Debug Source Highlight |debug-highlight|
25 Message Footer |gui-footer|
26 Balloon Evaluation |balloon-eval|
27
28These features were added specifically for use in the Motif version of gvim.
29However, the |alt-input| and |debug-highlight| were written to be usable in
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000030both vim and gvim. Some of the other features could be used in the non-GUI
31vim with slight modifications. However, I did not do this nor did I test the
Bram Moolenaar071d4272004-06-13 20:20:40 +000032reliability of building for vim or non Motif GUI versions.
33
34
351.1 Alternate Command Input *alt-input*
36
37For Vim to work with a debugger there must be at least an input connection
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000038with a debugger or external tool. In many cases there will also be an output
Bram Moolenaar071d4272004-06-13 20:20:40 +000039connection but this isn't absolutely necessary.
40
41The purpose of the input connection is to let the external debugger send
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000042commands to Vim. The commands sent by the debugger should give the debugger
Bram Moolenaar071d4272004-06-13 20:20:40 +000043enough control to display the current debug environment and state.
44
45The current implementation is based on the X Toolkit dispatch loop and the
46XtAddInput() function call.
47
48
491.2 Debug Signs *debug-signs*
50
51Many debuggers mark specific lines by placing a small sign or color highlight
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000052on the line. The |:sign| command lets the debugger set this graphic mark. Some
Bram Moolenaar071d4272004-06-13 20:20:40 +000053examples where this feature would be used would be a debugger showing an arrow
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000054representing the Program Counter (PC) of the program being debugged. Another
55example would be a small stop sign for a line with a breakpoint. These visible
Bram Moolenaar071d4272004-06-13 20:20:40 +000056highlights let the user keep track of certain parts of the state of the
57debugger.
58
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000059This feature can be used with more than debuggers, too. An IPE can use a sign
60to highlight build errors, searched text, or other things. The sign feature
Bram Moolenaar071d4272004-06-13 20:20:40 +000061can also work together with the |debug-highlight| to ensure the mark is
62highly visible.
63
64Debug signs are defined and placed using the |:sign| command.
65
66
671.3 Debug Source Highlight *debug-highlight*
68
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000069This feature allows a line to have a predominant highlight. The highlight is
70intended to make a specific line stand out. The highlight could be made to
Bram Moolenaar071d4272004-06-13 20:20:40 +000071work for both vim and gvim, whereas the debug sign is, in most cases, limited
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000072to gvim. The one exception to this is Sun Microsystem's dtterm. The dtterm
Bram Moolenaar071d4272004-06-13 20:20:40 +000073from Sun has a "sign gutter" for showing signs.
74
75
761.4 Message Footer *gui-footer*
77
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000078The message footer can be used to display messages from a debugger or IPE. It
79can also be used to display menu and toolbar tips. The footer area is at the
Bram Moolenaar071d4272004-06-13 20:20:40 +000080bottom of the GUI window, below the line used to display colon commands.
81
82The display of the footer is controlled by the 'guioptions' letter 'F'.
83
84
851.5 Balloon Evaluation *balloon-eval*
86
87This feature allows a debugger, or other external tool, to display dynamic
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000088information based on where the mouse is pointing. The purpose of this feature
Bram Moolenaar071d4272004-06-13 20:20:40 +000089was to allow Sun's Visual WorkShop debugger to display expression evaluations.
90However, the feature was implemented in as general a manner as possible and
91could be used for displaying other information as well.
92
Bram Moolenaar05159a02005-02-26 23:04:13 +000093The Balloon Evaluation has some settable parameters too. For Motif the font
94list and colors can be set via X resources (XmNballoonEvalFontList,
Bram Moolenaar071d4272004-06-13 20:20:40 +000095XmNballoonEvalBackground, and XmNballoonEvalForeground).
96The 'balloondelay' option sets the delay before an attempt is made to show a
97balloon.
98The 'ballooneval' option needs to be set to switch it on.
99
100Balloon evaluation is only available when compiled with the |+balloon_eval|
Bram Moolenaar44ecf652005-03-07 23:09:59 +0000101feature.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000102
103The Balloon evaluation functions are also used to show a tooltip for the
104toolbar. The 'ballooneval' option does not need to be set for this. But the
105other settings apply.
106
Bram Moolenaar44ecf652005-03-07 23:09:59 +0000107Another way to use the balloon is with the 'balloonexpr' option. This is
108completely user definable.
109
Bram Moolenaar071d4272004-06-13 20:20:40 +0000110==============================================================================
1112. Vim Compile Options *debugger-compilation*
112
113The debugger features were added explicitly for use with Sun's Visual
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000114WorkShop Integrated Programming Environment (ipe). However, they were done
Bram Moolenaar071d4272004-06-13 20:20:40 +0000115in as generic a manner as possible so that integration with other debuggers
116could also use some or all of the tools used with Sun's ipe.
117
118The following compile time preprocessor variables control the features:
119
120 Alternate Command Input ALT_X_INPUT
121 Debug Glyphs FEAT_SIGNS
122 Debug Highlights FEAT_SIGNS
123 Message Footer FEAT_FOOTER
124 Balloon Evaluation FEAT_BEVAL
125
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000126The first integration with a full IPE/IDE was with Sun Visual WorkShop. To
Bram Moolenaar071d4272004-06-13 20:20:40 +0000127compile a gvim which interfaces with VWS set the following flag, which sets
128all the above flags:
129
130 Sun Visual WorkShop FEAT_SUN_WORKSHOP
131
132==============================================================================
1333. Integrated Debuggers *debugger-integration*
134
Bram Moolenaarb23c3382005-01-31 19:09:12 +0000135One fully integrated debugger/IPE/IDE is Sun's Visual WorkShop Integrated
136Programming Environment.
137
138For Sun NetBeans support see |netbeans|.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000139
140 vim:tw=78:sw=4:ts=8:ft=help:norl: