Vscode: Windows Terminal as external terminal does not launch in the workspace directory

Created on 15 Feb 2020  路  4Comments  路  Source: microsoft/vscode



  • VSCode Version: 1.42.1 (user setup)
  • OS Version: Windows_NT x64 10.0.18363

Steps to Reproduce:

  1. Set terminal.external.windowsExec to wt
  2. Run "Open New External Terminal" from the command palette

A new instance of Windows Terminal opens, but with the default directory, instead of ${workspaceFolder}.

Windows Terminal Preview 0.9 recently released, allowing a starting directory to be specified with -d <starting dir>.

Possible solutions?:

  • Have Windows Terminal respected the current working directory when launched (see: https://github.com/microsoft/terminal/issues/4581), then no action required for VS Code.
  • VS Code can add a special case, like for cmder (https://github.com/microsoft/vscode/blob/997e4eaf740bb4310fea160f06de2c6256f12f7d/src/vs/workbench/contrib/externalTerminal/node/externalTerminalService.ts#L85-L91)


Does this issue occur when all extensions are disabled?: Yes

feature-request good first issue help wanted verification-needed verified windows

Most helpful comment

Will be fixed by #90773, my first pr for VsCode cheers :)

All 4 comments

Will be fixed by #90773, my first pr for VsCode cheers :)

Does anyone know if the change in #90773 is going to be merged? I'd love to see this issue resolved, as it's the only thing that's preventing me from fully switching over from ConEmu to Windows Terminal.

What about linux? Mine doesn't open in the opened project directory either, and I can't pass arguments to the "terminal.external.linuxExec" setting option. For example, with Konsole I would only need to add --workdir ${workspaceFolder} as an argument.

@Sleepful this issue's about Windows Terminal, if there is a popular terminal (like Konsole) that doesn't work we can open a new issue and open it to PRs. Here's the relevant code:

https://github.com/microsoft/vscode/blob/0fc6b39e3225f661d4ec63dc06734a0d9aa5abba/src/vs/workbench/contrib/externalTerminal/node/externalTerminalService.ts#L297-L299

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VitorLuizC picture VitorLuizC  路  3Comments

lukehoban picture lukehoban  路  3Comments

omidgolparvar picture omidgolparvar  路  3Comments

shanalikhan picture shanalikhan  路  3Comments

DovydasNavickas picture DovydasNavickas  路  3Comments