Skip to content

terminal.launchArgs not being used #198

@freeskier93

Description

@freeskier93

Type: Bug

Behaviour

python.terminal.launchArgs specified in the settings (workspace or user) are not being added when running a Python script. Reverting back to v2024.22.2 results in the arguments being added as expected.

Example Arguments:

"python.terminal.launchArgs": [
        "-m",
        "pytest",
        "-s"
]

Steps to reproduce:

  1. Define arguments in pythong.terminal.launchArgs
  2. Run Python script
  3. Arguments are not being added in terminal command executing script

Diagnostic data

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

025-02-21 11:40:45.825 [info] Experiment 'pythonRecommendTensorboardExt' is active
2025-02-21 11:40:45.825 [info] Experiment 'pythonTerminalEnvVarActivation' is active
2025-02-21 11:40:45.825 [info] Experiment 'pythonTestAdapter' is active
2025-02-21 11:40:45.825 [info] Native locator: Refresh started
2025-02-21 11:40:45.825 [info] Native locator: Refresh started
2025-02-21 11:40:45.925 [info] Native locator: Refresh finished in 133 ms
2025-02-21 11:40:45.934 [info] > pyenv which python
2025-02-21 11:40:45.934 [info] cwd: .
2025-02-21 11:40:47.153 [info] Starting Pylance language server.
2025-02-21 11:40:56.657 [info] Discover tests for workspace name: bug_report - uri: c:\bug_report
2025-02-21 11:40:56.661 [warning] The cwd resolves to a different path, checking if it has a symbolic link somewhere in its path.
2025-02-21 11:40:56.661 [info] All environment variables set for pytest discovery: {"ALLUSERSPROFILE":<redact>}
2025-02-21 11:40:57.093 [info] ============================= test session starts =============================
platform win32 -- Python 3.11.6, pytest-8.3.4, pluggy-1.5.0
rootdir: c:\bug_report
plugins: anyio-4.8.0, docker-3.1.1
collected 0 items

========================= no tests collected in 0.01s =========================

2025-02-21 11:40:57.135 [error] Subprocess exited unsuccessfully with exit code 5 and signal null on workspace c:\bug_report
2025-02-21 11:40:57.135 [error] pytest test discovery error for workspace:  c:\bug_report 
  
 The python test process was terminated before it could exit on its own, the process errored with: Code: 5, Signal: null for workspace c:\bug_report

Extension version: 2025.0.0
VS Code version: Code 1.97.2 (e54c774e0add60467559eb0d1e229c6452cf8447, 2025-02-12T23:20:35.343Z)
OS version: Windows_NT x64 10.0.22631
Modes:

  • Python version (& distribution if applicable, e.g. Anaconda): 3.11.6
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): System
  • Value of the python.languageServer setting: Pylance
User Settings


languageServer: "Pylance"

testing
• pytestArgs: "<placeholder>"
• pytestEnabled: true

terminal
• launchArgs: "<placeholder>"

Installed Extensions
Extension Name Extension Id Version
autodocstring njp 0.6.1
black-formatter ms- 2024.6.0
code-spell-checker str 4.0.34
debugpy ms- 2025.0.1
even-better-toml tam 0.21.2
githistory don 0.6.20
js-debug ms- 1.97.1
js-debug-companion ms- 1.1.3
python ms- 2025.0.0
rust-analyzer rus 0.3.2308
test-adapter-converter ms- 0.2.1
vscode-docker ms- 1.29.4
vscode-js-profile-table ms- 1.0.10
vscode-pylance ms- 2025.2.1
vscode-python-envs ms- 0.3.10441011
vscode-test-explorer hbe 2.22.1
System Info
Item Value
CPUs 12th Gen Intel(R) Core(TM) i5-12600K (16 x 3686)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 15.75GB (3.60GB free)
Process Argv --crash-reporter-id ea661649-d927-4c65-b5ec-309c5a57aa00
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupytercf:31046870
nativerepl2:31139839
pythonrstrctxt:31112756
nativeloc2:31192216
iacca1:31171482
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530
6074i472:31201624
dwoutputs:31242946
8did9651:31230678
9064b325:31222308
copilot_t_ci:31222730
jda6j935:31233686
copilothoveron:31240708

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bug

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions