1

(Sorry for the awful title, I obviously don't know I am talking about ;o)

I have a command which I assume is a Unix command

TSS_DEBUG=5667 code --user-data-dir ~/.vscode-debug/

What is the Windows PowerShell equivalent?

I tried

set TSS_DEBUG=5667; code --user-data-dir ~/.vscode-debug/

but it doesn't start a debugging version of VSCode.

Also, what is the variable TSS_DEBUG called? It's probably not an environment variable because it's local to the following command.

Edit: Thanks to mklement0, and the linked duplicate question, the solution is:

$env:TSS_DEBUG=5667; code --user-data-dir ~/.vscode-debug/
Page not found
  • 2,454
  • 2
  • 10
  • 19
  • 1
    I hope the linked duplicate answers your question; let us know if you think it isn't a duplicate. – mklement0 Jun 15 '22 at 21:57
  • 1
    As for wording: you're looking for a way to set _environment variables_ that are scoped to a given external-program call (child process). That is, only that call (child process) will see these environment variables. – mklement0 Jun 15 '22 at 22:00
  • 1
    Thank you! I added the solution to the question for completeness. <) – Page not found Jun 15 '22 at 22:04
  • 1
    Glad to hear it helped. Worth noting that, given that PowerShell currently does _not_ support command-scoped environment variables, `$env:TSS_DEBUG` lives on for the remainder of the caller's session, unless removed with `$env:TSS_DEBUG = $null` – mklement0 Jun 15 '22 at 22:07

0 Answers0