Skip to content
| Marketplace
Sign in
Visual Studio Code>Debuggers>Copy Launch CommandNew to Visual Studio Code? Get it now.
Copy Launch Command

Copy Launch Command

WeeZah

|
1 install
| (0) | Free
Copy the equivalent shell command for a launch.json debug configuration.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Copy Launch Command

Copies the shell command equivalent of a launch.json debug configuration to the clipboard, so you can paste it into a terminal, a Slurm script, or a bug report.

Currently generates commands for Python (debugpy / python) launch configurations.

Copying a launch configuration and pasting it into the terminal

Where the action lives

VS Code does not expose the ... overflow at the top of the Run and Debug container to extensions, so the action is surfaced in the four places that are available:

Location How
launch.json A Copy launch command CodeLens above each Python configuration. Most direct.
Command palette Copy Launch Command — pick any configuration from a list.
launch.json editor Right-click in the file, or the editor title ... menu.
Run and Debug panel The ... overflow of the Variables / Watch / Call Stack / Breakpoints views.

What it handles

  • program, module (-m), and code (-c) targets
  • args as an array (each element quoted) or as a string (passed through verbatim)
  • env (KEY=value cmd on POSIX, $env:KEY='value'; cmd on PowerShell)
  • envFile (set -a && . file && set +a && on POSIX)
  • cwd (prefixes cd only when it differs from the workspace folder)
  • The interpreter selected in the Python extension, or a per-config python / pythonPath
  • Variable substitution: ${workspaceFolder}, ${file} and its variants, ${env:X}, ${config:x.y}, ${userHome}, ${pathSeparator}, ${lineNumber}, ${selectedText}, ${workspaceFolder:name}, and ${input:id} (prompts you, exactly like a real launch)

Anything that cannot be represented in a shell — ${command:...}, envFile on PowerShell, template debugging flags — is reported as a caveat next to the copied command, with a Show details button that opens the full list.

Attach configurations and non-Python types are declined with an explanation rather than a guessed command.

Settings

Setting Default Meaning
copyLaunchCommand.pythonInterpreter "" Override the interpreter. Empty means ask the Python extension, then fall back to python3.
copyLaunchCommand.shell auto posix or powershell quoting. auto picks by platform.
copyLaunchCommand.includeCwd auto When to prefix cd.
copyLaunchCommand.relativePaths true Shorten paths inside the working directory to ./relative.
copyLaunchCommand.codeLens true Show the CodeLens in launch.json.

Developing

npm install
npm run compile      # or: npm run watch

Press F5 to open an Extension Development Host with the extension loaded.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft