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

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

Closed
dgrunwald opened this issue Apr 6, 2022 · 5 comments
Closed
Assignees
Labels
area-debugging area-environments Features relating to handling interpreter environments author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug regression Bug didn't exist in a previous release
Milestone

Comments

@dgrunwald
Copy link

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

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Apr 6, 2022
@karrtikr
Copy link

karrtikr commented Apr 6, 2022

Duplicate of #18835

@karrtikr karrtikr marked this as a duplicate of #18847 Apr 6, 2022
@karrtikr karrtikr marked this as a duplicate of #18835 Apr 6, 2022
@karrtikr karrtikr marked this as not a duplicate of #18847 Apr 6, 2022
@karthiknadig karthiknadig removed the triage-needed Needs assignment to the proper sub-team label Apr 12, 2022
@dgrunwald
Copy link
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).

@karrtikr karrtikr self-assigned this Apr 13, 2022
@karrtikr karrtikr added needs PR area-debugging area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug regression Bug didn't exist in a previous release labels Apr 13, 2022
@karrtikr
Copy link

Working on adding back support for that with #18920.

@karrtikr karrtikr reopened this Apr 13, 2022
@karrtikr karrtikr added this to the April 2022 milestone Apr 13, 2022
@karrtikr
Copy link

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

image

@karrtikr karrtikr added the verification-needed Verification of issue is requested label Apr 13, 2022
@rchiodo
Copy link

rchiodo commented Apr 27, 2022

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

@rchiodo rchiodo added the author-verification-requested Issues potentially verifiable by issue author label Apr 27, 2022
@joyceerhl joyceerhl removed the verification-needed Verification of issue is requested label Apr 27, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-debugging area-environments Features relating to handling interpreter environments author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug regression Bug didn't exist in a previous release
Projects
None yet
Development

No branches or pull requests

5 participants