Skip to content

v2022.4.0 regression: The Python path in your debug configuration is invalid. #18872

Closed

Description

Issue Type: Bug

Behaviour

Expected vs. Actual

When launching the debugger, the error "The Python path in your debug configuration is invalid." pops up.
This is a regression in v2022.4.0; the same launch configuration worked correctly in v2022.2.1924087327.

Additionally, sometimes the file .vscode\extensions\ms-python.python-2022.4.0\pythonFiles\get_output_via_markers.py is opened in notepad++ (the default associated editor when double-clicking a .py file on my machine). It seems that whatever is trying to automatically run this script is instead just opening it. I'm not sure if this is related to the failure to launch the debugger.

Steps to reproduce:

This is the launch configuration in question:

        {
            "name": "rfgscript: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "python": "${workspaceFolder}/bin/rfgscript.exe",
            "console": "integratedTerminal"
        },

The file "rfgscript.exe" exists and is a custom application that loads python37.dll at run-time (via LoadLibrary). Note: python37.dll is not in the same directory as the custom .exe. The custom application accepts the same command-line arguments as the usual python.exe.

Diagnostic data

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


defaultLS: {"defaultLSType":"Pylance"}

downloadLanguageServer: true

envFile: "<placeholder>"

venvPath: "<placeholder>"

venvFolders: "<placeholder>"

condaPath: "<placeholder>"

pipenvPath: "<placeholder>"

poetryPath: "<placeholder>"

languageServer: "Pylance"

linting
• enabled: true
• cwd: "<placeholder>"
• Flake8Args: "<placeholder>"
• flake8Enabled: false
• flake8Path: "<placeholder>"
• lintOnSave: true
• banditArgs: "<placeholder>"
• banditEnabled: false
• banditPath: "<placeholder>"
• mypyArgs: "<placeholder>"
• mypyEnabled: false
• mypyPath: "<placeholder>"
• pycodestyleArgs: "<placeholder>"
• pycodestyleEnabled: false
• pycodestylePath: "<placeholder>"
• prospectorArgs: "<placeholder>"
• prospectorEnabled: false
• prospectorPath: "<placeholder>"
• pydocstyleArgs: "<placeholder>"
• pydocstyleEnabled: false
• pydocstylePath: "<placeholder>"
• pylamaArgs: "<placeholder>"
• pylamaEnabled: false
• pylamaPath: "<placeholder>"
• pylintArgs: "<placeholder>"
• pylintPath: "<placeholder>"

sortImports
• args: "<placeholder>"
• path: "<placeholder>"

formatting
• autopep8Args: "<placeholder>"
• autopep8Path: "<placeholder>"
• provider: "black"
• blackArgs: "<placeholder>"
• blackPath: "<placeholder>"
• yapfArgs: "<placeholder>"
• yapfPath: "<placeholder>"

testing
• cwd: "<placeholder>"
• debugPort: 3000
• nosetestArgs: "<placeholder>"
• nosetestsEnabled: undefined
• nosetestPath: "<placeholder>"
• promptToConfigure: true
• pytestArgs: "<placeholder>"
• pytestEnabled: false
• pytestPath: "<placeholder>"
• unittestArgs: "<placeholder>"
• unittestEnabled: false
• autoTestDiscoverOnSaveEnabled: true

terminal
• activateEnvironment: true
• executeInFileDir: "<placeholder>"
• launchArgs: "<placeholder>"

experiments
• enabled: true
• optInto: []
• optOutFrom: []

tensorBoard
• logDirectory: "<placeholder>"

Extension version: 2022.4.0
VS Code version: Code 1.66.0 (e18005f0f1b33c29e81d732535d8c0e47cafb0b5, 2022-03-30T05:50:14.623Z)
OS version: Windows_NT x64 10.0.19044
Restricted Mode: No

System Info
Item Value
CPUs AMD Ryzen 7 1800X Eight-Core Processor (16 x 3600)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.95GB (16.50GB free)
Process Argv --crash-reporter-id 07287267-3737-4a02-8227-6b17bacd3f68
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
vscaac:30438847
pynewfile477:30463512

Activity

  1. added
    triage-needed
    on Apr 6, 2022
  2. karrtikr commented on Apr 6, 2022

    @karrtikr

    Duplicate of #18835

  3. removed
    triage-needed
    on Apr 12, 2022
  4. dgrunwald commented on Apr 13, 2022

    @dgrunwald
    Author

    Some of my configs had:
    "python": "${workspaceFolder}/bin/rfgscript",

    It seems that with the new version (v2022.5.11021002) the .exe file extension is required, otherwise I'm still getting the "The Python path in your debug configuration is invalid." error.
    This makes it troublesome to reuse the launch config across platforms (Windows/Linux).

  5. added
    area-environments
    bug
    regression
    on Apr 13, 2022
  6. karrtikr commented on Apr 13, 2022

    @karrtikr

    Working on adding back support for that with #18920.

  7. karrtikr commented on Apr 13, 2022

    @karrtikr

    Fix should be out in the pre-release version of the extension in a day, use the following to try it out:

    image

  8. added
    verification-needed
    on Apr 13, 2022
  9. rchiodo commented on Apr 27, 2022

    @rchiodo

    Daniel Grunwald (@dgrunwald) can you try out the latest prerelease version to see if this is fixed or not? Thanks.

  10. added
    author-verification-requested
    on Apr 27, 2022
  11. removed
    verification-needed
    on Apr 27, 2022
  12. locked as resolved and limited conversation to collaborators on May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-debuggingarea-environmentsauthor-verification-requestedbugregression

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions