-
Notifications
You must be signed in to change notification settings - Fork 29k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
launching the debugger in tmux no longer works #43683
Comments
The problem occurs in 1.20.0 because we've tried to fix #37589 by introducing a "busy check" (see #37589 (comment)). When using tmux, this checks always indicates the terminal is busy because tmux is already running. This results in a new terminal being created. I will try to fix this by detecting whether "tmux" is running and in this case return "not busy". With this VS Code should use the old behaviour. @Mellbourn please try this in tomorrows Insiders. |
Reopened because my attempt to fix this only applies to linux and macOS. |
@weinand do you still want me to try tomorrows insider? |
Sure, the fix should work on macOS (the bug was closed automatically by my commit; I could not prevent this...) I'm not sure that "tmux" even exists (or is used) on Windows... |
Please note that issue #37589 cannot be addressed when using "tmux". |
@weinand actually, if you can get debugging to work the way it did before in tmux, then #37589 not a problem for tmux. |
Yes, if you have a chance to switch the focus, you can launch multiple concurrent sessions. |
It looks like that a native tmux does not exist for Window. |
Regarding tmux on windows: P.S. I've installed insiders build and will try it tomorrow on macOS |
Yes, I'm aware of tmux under WSL or cygwin. That's why I said "native" tmux. Currently we just don't have enough cycles to work around the tmux issue for those as well... |
I’ve run the Insiders edition now, 1.21.0 eb5e41c. It definitely works better now, I can get the debugger running in the integrated terminal running tmux. However, it does feel a more flaky than before. There are two new problems: It never works the first time I try to run the debugger (when the integrated terminal has number “1” and is called “sh”), the only thing that happens then is the classic quick flash of the debug command and that another terminal is created (“2: Node Debug Console”). If the integrated terminal tab is hidden when I start the debugger, then when the “2: Node Debug Console” shows up, it shows a screen filled with “.” and in the lower right corner it says “(size 206x1 from a smaller client)” as if tmux was showing a much smaller window somewhere else (on the “sh” tab?). If I switch back to the “sh” terminal tab, the problem goes away and tmux is rendered correctly again. Unfortunately, the last problem is fairly serious, since the point of running the debugger in the integrated terminal is that I want to watch what it is doing, so I am constantly hiding the terminal to edit the code, and then showing it again to see how my changes have affected the tests. |
After further investigation it seems to me that the problem of the tmux terminal screen filling with '.' is not directly related to the debugging problem. This problem is specific to insiders build and does not occur in the 1.20 release version. The problem is very noticeable when debugging, though, since the debugger creates a new terminal window. |
thanks for your investigation. I suggest that you file another bug against the integrated terminal. |
Ok, will do. |
I have the setup that was described by João Moreno (@joaomoreno) in his blog post https://medium.com/@joaomoreno/persistent-terminal-sessions-in-vs-code-8fc469ed6b41
Whenever I open a terminal tab in VS Code, i enter a tmux session (often attaching to an already present tmux session)
I love this setup! Among other things, it allows all the window control of tmux and it enables me to restart VSCode without losing my terminal session.
Debugging has worked fine in this setup for a long time. With the setting
"console": "integratedTerminal"
, the debugger starts inside the tmux shell, which is just what I want.After 1.20.0, this has stopped working for me. When I start debugging by pressing
F5
, the debug command seems to flash briefly in the terminal tab, then it shows tmux. But the debugging never starts. (A new shell calledNode Debug Console
is created, but for me it just attaches to the same tmux session. May be what is happening is that the debug command is typed to the terminal window, but never executed because then the tmux session is attached).Another hypothesis: Previously, I think there was a pause before the debug command started, which may have let the tmux session start so that the debug command could then run inside the tmux pane.
Thanks for an otherwise great product!
Steps to Reproduce:
launch.config
with"console": "integratedTerminal"
(which worked previously)F5
Does this issue occur when all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered: