You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PowerShell script debugpy.ps1 incorrectly handles multiple arguments passed as an array #1024
When using the PowerShell wrapper script debugpy.ps1 to debug a Python script that accepts multiple command-line arguments, the arguments are not properly passed through to the Python script when provided as an array.
Steps to Reproduce:
Create a test Python script (test.py):
importsysprint(sys.argv)
Create a PowerShell script (run.ps1):
$arg_list=@('arg1','arg2')
$file="test.py"& python $file$arg_list# Works correctly& debugpy $file$arg_list# Fails - arguments are concatenated
Root Cause:
The current debugpy.ps1 script passes $args directly to the Python command without using splatting (@args). When an array is passed to the script, PowerShell's $args receives it as a single object rather than expanding it into multiple arguments.
Activity
nightcityblade commentedon Aug 27, 2026
Hi, I'd like to work on this. I'll submit a focused PR with a regression test for passing array arguments through debugpy.ps1.