Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger stopped working - runs raw path to python with error #494

Open
DimitryNechaev opened this issue Oct 28, 2024 · 2 comments
Open
Assignees
Labels
triage-needed Needs assignment to the proper sub-team

Comments

@DimitryNechaev
Copy link

Out of nowhere can't debug any of my projects

c:\Program: The term 'c:\Program' is not recognized as a name of a cmdlet, function, script file, or executable program.

Image

Changing "Python: Select Interpreter path"
Image

Or in settings:
Image

Has absolutely no effect on the path to Python in the debugger. It has no means of control.

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Oct 28, 2024
@eleanorjboyd
Copy link
Member

@Tyriar any thoughts here? Seems to be selecting the wrong shell prompt and causing an error but i am not super familiar with this section of the code so Im not totally sure.

@DimitryNechaev
Copy link
Author

I narrowed this down to using parameters. Without parameters it runs correct command.

{
    // 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": "ProcessOrders",
            "type": "debugpy",
            "request": "launch",
            "program": "ProcessOrders.py",
            "console": "integratedTerminal"
        },
        {
            "name": "TestMarlinOrder <99699>",
            "type": "debugpy",
            "request": "launch",
            "program": "TestMarlinOrder.py",
            "args": "99699",
            "console": "integratedTerminal"
        },        
        {
            "name": "TestMarlinOrder <param>",
            "type": "debugpy",
            "request": "launch",
            "program": "TestMarlinOrder.py",
            "args": "${input:orderid}",
            "console": "integratedTerminal"
        },
    ],
    "inputs": [
        {
            "id": "orderid",
            "type": "promptString",
            "description": "Order ID",
            "default": "99698"
        }
    ]
}

without parameter:

PS C:\work\Test>  c:; cd 'c:\work\Test'; & 'c:\Program Files\Python312\python.exe' 'c:\Users\<me>\.vscode\extensions\ms-python.debugpy-2024.12.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher' '54574' '--' 'ProcessOrders.py'

Runs OK.

with parameter:

PS C:\work\Test>  c:; cd 'c:\work\Test'; c:\Program Files\Python312\python.exe c:\Users\<me>\.vscode\extensions\ms-python.debugpy-2024.12.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher 54602 -- TestMarlinOrder.py 99698

ERROR: c:\Program: The term 'c:\Program' is not recognized as a name of a cmdlet, function, script file, or executable program.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

2 participants