Tried it on linux, and want to use it on windows. but there is an
E492: Not an editor command: Termdebug
on windows gvim.
The command is still unusable after :packadd termdebug
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
when exactly do you encounter that? You started with vim --clean? do you have termdebug in your local $VIMRUNTIME?
I encountered this after packadd termdebug and :Termdebug. Weird, termdebug.vim is not included in gvim_8.0.1806_x86.exe, but included in gvim_8.0.1806_x86.
If you decompress gvim_8.0.1806_x86.zip, there is a termdebug.vim located in:
vim80\pack\dist\opt\termdebug
But if vim is installed from the win32 installer, you can't find the termdebug package.
We need to update the filelist in gvim.nsi.
If we can use File /r, the list can be made simpler.
Vim on Windows support communicating via pty But gdb command provided for Windows doesn't support "new-ui mi" command with pipe. So TermDebug not to work on Windows correctly.
But why does https://github.com/cpiger/NeoDebug work on windows while termdebug not ?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.![]()
Because it just use "set new-console on" command. not communicating via tty.
so could we make the termdebug workable on Windows? I don't understand gdb good enough to guess what needs to be changed or what set new-console on does differently.
set new-console on create new cmd.exe for the target process. This behavior mean that termdebug can't communicate to mi2 interface. it should communicate to gdb prompt directly. I guess.
So, Termdebug has three windows: the source window, the gdb console window and the output window. Can we just disable output window on Windows, and redirect the stdout/stdin of debugging process to the gdb console window ?
The output window of gdb-mode in emacs doesn't work on Windows too. But gdb-mode is still useable on window and the program output will be displayed in the gdb console window directly.
—
And can we use a standalone cmd.exe window for the process which is been debugging, just like debugging console applications in visual studio ??
—
GDB has a set new-console on windows, similar to tty command on linux:
set new-console onIn this mode GDB will start the debugged program in a new console. The output of the program will be shown in a separate window that will be closed after the program exits.
see the documentation:
http://visualgdb.com/gdbreference/commands/set_new-console
And I can use tty command to specify a terminal for NeoDebug:
tty to display the current tty file name.tty /dev/pts/0 in NeoDebugSee, I can debug my program in a vim terminal.
for more information about tty command in gdb:
https://sourceware.org/gdb/onlinedocs/gdb/Input_002fOutput.html
The only side effect is that I can't find a easy way to fetch tty filename of a terminal buffer. have to type tty command in the terminal.
update: tty doesn't work in a vim terminal buffer if the program reads data from stdin.
And neodebug is a little bit unstable now, could termdebug.vim emit a set new-console on command automatically on windows, and at least we can debug TUI programs in a separate console window on windows ??
—
but the "new-ui" command is still missing in MS-Windows gdb builds, right?
Yes, it doesn't work on Windows. also passing named pipe also not work. new-ui mi con or new-ui mi CONOUT$ are not work too.
And I can use
ttycommand to specify a terminal for NeoDebug:
- start NeoDebug and open a new terminal in vim.
- use bash command
ttyto display the current tty file name.- use
tty /dev/pts/0in NeoDebug- run the process.
See, I can debug my program in a vim terminal.
for more information about
ttycommand in gdb:
https://sourceware.org/gdb/onlinedocs/gdb/Input_002fOutput.htmlThe only side effect is that I can't find a easy way to fetch tty filename of a terminal buffer. have to type
ttycommand in the terminal.
—
You are receiving this because you commented.
That’s a reasonable point. And a little pity.
Closed #2882.