Closed jbbudzon closed 4 years ago
None of this is controlled by Vimspector, it's all the debug adapter you're using.
If you don't want a new Terminal.app window to open, remove this from the adapter config:
"env": {"LLDB_LAUNCH_FLAG_LAUNCH_IN_TTY": "NO"}
NOTE: Setting the variable to "NO" has the same effect as it being set to "YES". The behaviour is enabled in lldb code when the variable is set
This is entirely at the behest of lldb-vscode
. Unfortunately it's a restriction of lldb that we can't launch the app in Vim's embedded terminal. This is true for both lldb-vscode (which you're using) and vscode-cpptools, which currently has other issues.
That said, I can't explain the Kitty behaviour you're seeing (it must be something about your environment), because it worked for me. I don't use Kitty, but I just installed it following their website instructions and tested Vimspector 👍
Oh, you might be able to get a better experience with the built-in Vim terminal by using vscode-cpptools with gdb
. That requires::
vscode-lldb
in place of vscode-cpptools (remove /path/to/Vimspector/gadgets/macos/.gadgets.d/vscode-cpptools.json)"MIMode": "gdb"
to the launch configuration in your .vimspector.json
I know, lots of fiddly steps. This all worked great until vscode-cpptools stopped working with the Catalina upgrade.
FWIW, all of these problems also exist for VSCode users, but I'm the one trying to fix them
Closing because;
Thanks guys! Sorry for the false report. I thought I had tried removing the LLDB_LAUNCH_FLAG_LAUNCH_IN_TTY
and it didn't work, but clearly I am wrong!
I now have kitty.app working just fine and no extra terminal windows are spawning which is even nicer!
great 👍
Describe the bug Vimspector seems to work just fine for me if I use terminal.app. When telling Vimspector to launch a debugging session, a new terminal.app window spawns, some commands execute in the newly spawned window, and Vimspector properly starts debugging.
This also appears to be true for iTerm2. When telling Vimspector to launch a debugging session, a new terminal.app window spawns (NOT an iTerm2 window). The first time I performed this test, OSX asked me if I wanted to allow iTerm2 to control terminal.app. I said yes. Once this was performed, some commands execute in the newly spawned terminal.app window, and Vimspector properly starts debugging.
If I run this test with Kitty.app, however, Vimspector times out. In this case, telling Vimspector to launch a debugging session causes a terminal.app window to spawn (similar to iTerm2). However, I was never prompted about allowing kitty to control terminal.app. Therefore, no commands ever execute in the newly spawned terminal.app window. This results in Vimspector timing out.
To Reproduce Attempt to use Vimspector with kitty.app. The result is a time out. Using iTerm2 with Vimspector results in a terminal.app window spawning, not an iTerm2 window.
Vimspector config file:
Expected behavior There are a few things that would fulfill my expected behavior. One would be that the kitty project add support for controlling terminal.app the same way iTerm does. This should result in kitty.app working no differently than iTerm2. However, I do find it odd that iTerm2 spawns a terminal.app window instead of a iTerm2 window. Perhaps, this is just a matter of OS configuration? If so, maybe we can document this in the readme?
Actual behaviour kitty.app causes Vimspector to time out. iTerm2 launches terminal.app, rather than launching an iTerm2 window.
Please include:
Did not see any output here.
Environment
NOTE: NeoVim is not supported. NOTE: Windows is not supported.
vim --version
which vim
::py3 pass
:I did not receive any output from this command?
Additional context One thing I did notice is that iTerm2 has the ability to control terminal.app via OSX Security settings. Kitty does not have this and I presume is why kitty behaves differently than iTerm2 (although I'm not entirely certain that iTerm2's behavior is desirable).