Skip to content

Debugger fails upon first Run Without Debug with a new Debug Console on Windows + PowerShell #827

Closed

Description

@cmp0xff

I noticed that in a Debug Console, the commands to start Run Without Debug for the first time and later, are different.

First run (failure):

$  & 'c:\Users\UserName\Documents\project\.venv\Scripts\python.exe' 'c:\Users\UserName\.vscode\extensions\ms-python.debugpy-2025.14.0-win32-x64\bundled\libs\debugpy\launcher' '51051' '--' 'C:\Users\UserName\Documents\project\sandbox\user_name\TICKET-🇫🇷-🇬��\20250821\script.py' 
c:\Users\UserName\Documents\project\.venv\Scripts\python.exe: can't open file 'C:\\Users\\UserName\\Documents\\project\\sandbox\\user_name\\TICKET-🇫🇷-🇬��\\20250821\\script.py': [Errno 2] No such file or directory

Second and later run (works fine):

$  c:; cd 'c:\Users\UserName\Documents\project'; & 'c:\Users\UserName\Documents\project\.venv\Scripts\python.exe' 'c:\Users\UserName\.vscode\extensions\ms-python.debugpy-2025.14.0-win32-x64\bundled\libs\debugpy\launcher' '54332' '--' 'C:\Users\UserName\Documents\project\sandbox\user_name\TICKET-🇫🇷-🇬🇧\20250821\script.py'

Activity

  1. eleanorjboyd commented on Oct 10, 2025

    @eleanorjboyd
    Contributor

    Hi! Can you clarify exactly which buttons you are clicking the start "Run Without Debug"? Additionally what is in your launch.json?

  2. eleanorjboyd commented on Oct 10, 2025

    @eleanorjboyd
    Contributor

    wondering if its related to this? #826

    Don't totally think so but am not sure if maybe that is impacting the command being constructed. Will look into it more- thanks

  3. cmp0xff commented on Oct 10, 2025

    @cmp0xff
    Author

    Hi Eleanor Boyd (@eleanorjboyd) , thank you for the triage.

    Can you clarify exactly which buttons you are clicking the start "Run Without Debug"?

    Image

    Additionally what is in your launch.json?

    {
        // Use IntelliSense to learn about possible attributes.
        // Hover to view descriptions of existing attributes.
        // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
        "version": "0.2.0",
        "configurations": [
    
            {
                "name": "Python Debugger: Current File",
                "type": "debugpy",
                "request": "launch",
                "program": "${file}",
                "console": "integratedTerminal",
                "justMyCode": false
            }
        ]
    }
  4. eleanorjboyd commented on Oct 10, 2025

    @eleanorjboyd
    Contributor

    can you try again with the newest pre-release version of the debugger extension and let me know if it is still broken? Curious if the path fix did anything because this bug is pretty strange and I don't have a ton of ideas for why it is doing that incorrect substitution

  5. cmp0xff commented on Oct 10, 2025

    @cmp0xff
    Author

    can you try again with the newest pre-release version of the debugger extension and let me know if it is still broken?

    • With the newest release version, the problem persists.

    • With the newest pre-release version, the problem is resolved.

      In particular, in the first run, the command reads

      & 'c:\Users\UserName\Documents\project\.venv\Scripts\python.exe' 'c:\Users\UserName\.vscode\extensions\ms-python.debugpy-2025.15.2025101002-win32-x64\bundled\libs\debugpy\launcher' '61299' '--' 'C:\Users\UserName\Documents\project\sandbox\user_name\TICKET-🇫🇷-🇬🇧\20250821\script.py'

      Note that in the failed command, the unicode emoji in the path is garbled, while for the working commands, these characters show properly.

    Thank you for the fix!

  6. eleanorjboyd commented on Oct 10, 2025

    @eleanorjboyd
    Contributor

    Great! Glad to hear it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

info-neededIssue requires more information from postertriage-neededNeeds assignment to the proper sub-team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions