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

"Debug and Run" Button doesn't recognize predefined interpreter in settings.json and selects a different one #363

Open
atheo89 opened this issue Jun 12, 2024 · 3 comments
Assignees
Labels
triage-needed Needs assignment to the proper sub-team

Comments

@atheo89
Copy link

atheo89 commented Jun 12, 2024

Description

"Debug and Run" Button doesn't recognize predefined interpreter in settings.json and selects a different one, in contrary the Run icon on top left on the screen works as expected.

OS/Web Information

  • Web Browser: Chrome/firefox
  • Local OS: fedora
  • Remote OS: fedora
  • Remote Architecture: amd64
  • code-server --version: 4.22.0
  • ms python: v2024.2.1

Steps to Reproduce

  1. Launch code server
  2. Install ms-python extension
  3. Set on settings.json your preferred interpreter "python.defaultInterpreterPath": "/path/to/different/interpreter"
  4. Reload Window
  5. Create a test python file
  6. Press Run > icon on the top right. It will run your file without issue using the predefined interpreter.
  7. Now press on Run and Debug and see on the bottom right banner the in the python section use a different interpreter from the one that we pre defined.

Expected

The "Run and Debug" button to use the python interpreter that is been defined on the settings.json file by the user.

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jun 12, 2024
@paulacamargo25
Copy link
Contributor

Thanks for the bug report, I'll try to reproduce it. Could you confirm that you don't have a launch config in launch.json or in settings.json. And could you also send me the value of your interpreter path in the Python Extension? (you can find it in the right bottom corner)

@paulacamargo25 paulacamargo25 added the info-needed Issue requires more information from poster label Jun 13, 2024
@atheo89
Copy link
Author

atheo89 commented Jun 19, 2024

Hi, thank you for your patience on the reply!

I only use settings.json file to set up the desired interpreter, I don't have launch.json

Here’s the configuration:

{
  "python.defaultInterpreterPath": "/opt/app-root/bin/python3"
}

I have the same interpreter path in the Python Extension.

@paulacamargo25
Copy link
Contributor

Thanks for your reply, i'll try to repro the issue :)

@paulacamargo25 paulacamargo25 removed the info-needed Issue requires more information from poster label Jul 18, 2024
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

3 participants