VS Code holds onto parent console when launched via command line
See original GitHub issueRepro:
- Open cmd.exe
- Run
code
- Switch back to cmd.exe
exit
Repro’s in stable and insiderrs and does not repro in Atom which is also on Electron 2.
Advice from Windows console team:
I believe VSCode is reconnecting to its parent hosting console for debugging purposes.
Starting with @joaomoreno who might know who to send this to, not sure who the real owner is though.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:28 (18 by maintainers)
Top Results From Across the Web
Integrated Terminal in Visual Studio Code
Moving a terminal into its own group can be done with the Terminal: Unsplit Terminal command through the Command Palette or in the...
Read more >Command Line Interface (CLI) - Visual Studio Code
Visual Studio Code has a powerful command-line interface built-in that lets you control how you launch the editor. You can open files, install...
Read more >User and Workspace Settings - Visual Studio Code
You can also open the Settings editor from the Command Palette ... whether you can drag and drop a file into a text...
Read more >Debugging in Visual Studio Code
The top-level Run menu has the most common run and debug commands: ... VS Code keeps debugging configuration information in a launch.json file...
Read more >Troubleshoot Terminal launch failures - Visual Studio Code
Test your shell directly. Try running your designated integrated terminal shell outside VS Code from an external terminal or command prompt. · Use...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any updates on this. Reading through the comments is a little confusing if this is planned to be fixed, or not. What is weird, is it use to work where running “code .” from the command line did NOT seem to hijack the PowerShell 7 session. But now it does it again. I do have a newly installed computer so there may be a behavior related to some kind of setting?
not really minor as your shell (cmd.exe) becomes almost useless as it has debug logs spewed to it which makes reading what you should have there almost impossible.
Note: there are people saying “use code.bat” not “code.exe” however - that workaround does not work when you use
start some_file_with_type_registered_to_code
. for example if you associatexml
files withcode
via the windows explorer (always open with) and then from a cmd.exe shell runstart test.xml
which is pretty basic windows behaviour you get the debug messages in the console. You can not change the association tocode.bat
as that spawns a new console window when you open the file fromexplorer
the upstream PR has been closed and so appears stalled for real this time.