Mercurial > vim
comparison runtime/doc/terminal.txt @ 14107:274c9f1fbfd2 v8.1.0071
patch 8.1.0071: terminal debugger only works with the terminal feature
commit https://github.com/vim/vim/commit/b3307b5e7e7bd3962b0d5c61a94e638564c146b0
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 17 21:34:11 2018 +0200
patch 8.1.0071: terminal debugger only works with the terminal feature
Problem: Terminal debugger only works with the terminal feature.
Solution: Make it also work with a prompt buffer. Makes it possible to use
on MS-Windows. Various other improvements. (closes #3012)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 17 Jun 2018 21:45:05 +0200 |
parents | f39150ec146e |
children | 279465096a16 |
comparison
equal
deleted
inserted
replaced
14106:1293c0cd90ff | 14107:274c9f1fbfd2 |
---|---|
36 Starting |termdebug-starting| | 36 Starting |termdebug-starting| |
37 Example session |termdebug-example| | 37 Example session |termdebug-example| |
38 Stepping through code |termdebug-stepping| | 38 Stepping through code |termdebug-stepping| |
39 Inspecting variables |termdebug-variables| | 39 Inspecting variables |termdebug-variables| |
40 Other commands |termdebug-commands| | 40 Other commands |termdebug-commands| |
41 Prompt mode |termdebug-prompt| | |
41 Communication |termdebug-communication| | 42 Communication |termdebug-communication| |
42 Customizing |termdebug-customizing| | 43 Customizing |termdebug-customizing| |
43 | 44 |
44 {Vi does not have any of these commands} | 45 {Vi does not have any of these commands} |
45 {only available when compiled with the |+terminal| feature} | 46 {only available when compiled with the |+terminal| feature} |
618 | 619 |
619 The Terminal debugging plugin can be used to debug a program with gdb and view | 620 The Terminal debugging plugin can be used to debug a program with gdb and view |
620 the source code in a Vim window. Since this is completely contained inside | 621 the source code in a Vim window. Since this is completely contained inside |
621 Vim this also works remotely over an ssh connection. | 622 Vim this also works remotely over an ssh connection. |
622 | 623 |
624 When the |+terminal| feature is missing, the plugin will use the "prompt" | |
625 buffer type, if possible. The running program will then use a newly opened | |
626 terminal window. See |termdebug-prompt| below for details. | |
627 | |
623 | 628 |
624 Starting ~ | 629 Starting ~ |
625 *termdebug-starting* | 630 *termdebug-starting* |
626 Load the plugin with this command: > | 631 Load the plugin with this command: > |
627 packadd termdebug | 632 packadd termdebug |
797 *:Program* jump to the window with the running program | 802 *:Program* jump to the window with the running program |
798 *:Source* jump to the window with the source code, create it if there | 803 *:Source* jump to the window with the source code, create it if there |
799 isn't one | 804 isn't one |
800 | 805 |
801 | 806 |
807 Prompt mode ~ | |
808 *termdebug-prompt* | |
809 When the |+terminal| feature is not supported and on MS-Windows, gdb will run | |
810 in a buffer with 'buftype' set to "prompt". This works slightly differently: | |
811 - The gdb window will be in Insert mode while typing commands. Go to Normal | |
812 mode with <Esc>, then you can move around in the buffer, copy/paste, etc. | |
813 Go back to editing the gdb command with any command that starts Insert mode, | |
814 such as `a` or `i`. | |
815 - The program being debugged will run in a separate window. On MS-Windows | |
816 this is a new console window. On Unix, if the |+terminal| feature is | |
817 available a Terminal window will be opened to run the debugged program in. | |
818 | |
819 *termdebug_use_prompt* | |
820 Prompt mode can be used even when the |+terminal| feature is present with: > | |
821 let g:termdebug_use_prompt = 1 | |
822 | |
823 | |
802 Communication ~ | 824 Communication ~ |
803 *termdebug-communication* | 825 *termdebug-communication* |
804 There is another, hidden, buffer, which is used for Vim to communicate with | 826 There is another, hidden, buffer, which is used for Vim to communicate with |
805 gdb. The buffer name is "gdb communication". Do not delete this buffer, it | 827 gdb. The buffer name is "gdb communication". Do not delete this buffer, it |
806 will break the debugger. | 828 will break the debugger. |
834 When 'background' is "dark": | 856 When 'background' is "dark": |
835 hi debugPC term=reverse ctermbg=darkblue guibg=darkblue | 857 hi debugPC term=reverse ctermbg=darkblue guibg=darkblue |
836 hi debugBreakpoint term=reverse ctermbg=red guibg=red | 858 hi debugBreakpoint term=reverse ctermbg=red guibg=red |
837 | 859 |
838 | 860 |
861 Shorcuts *termdebug_shortcuts* | |
862 | |
863 You can define your own shortcuts (mappings) to control gdb, that can work in | |
864 any window, using the TermDebugSendCommand() function. Example: > | |
865 map ,w :call TermDebugSendCommand('where')<CR> | |
866 The argument is the gdb command. | |
867 | |
868 | |
839 Popup menu *termdebug_popup* | 869 Popup menu *termdebug_popup* |
840 | 870 |
841 By default the Termdebug plugin sets 'mousemodel' to "popup_setpos" and adds | 871 By default the Termdebug plugin sets 'mousemodel' to "popup_setpos" and adds |
842 these entries to the popup menu: | 872 these entries to the popup menu: |
843 Set breakpoint `:Break` | 873 Set breakpoint `:Break` |