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

[BUG] Debugging with purpose ignored in user/workspace settings. #525

Open
byehack opened this issue Oct 6, 2021 · 5 comments
Open

[BUG] Debugging with purpose ignored in user/workspace settings. #525

byehack opened this issue Oct 6, 2021 · 5 comments
Labels
bug Issue identified by VS Code Team member as probable bug needs PR Ready to be worked on

Comments

@byehack
Copy link

byehack commented Oct 6, 2021

Environment data

  • VS Code version: v1.60.0
  • Extension version (available under the Extensions sidebar): v2021.9.1246542782
  • OS and version: win10 20h2 64bit
  • Python version (& distribution if applicable, e.g. Anaconda): py3.7.7 32bit
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): `N/A
  • Relevant/affected Python packages and their versions: pylance v2021.9.4, jupyter v2021.8.2041215044
  • Value of the python.languageServer setting: Default

Steps to reproduce:

  1. add this configuration in workspace/user settings:
    "launch": {
        "version": "0.2.0",
        "configurations": [
            {
                "name": "Python: Current File - Editor button",
                "type": "python",
                "request": "launch",
                "program": "${file}",
                "console": "integratedTerminal",
                "justMyCode": false,
                "purpose": ["debug-in-terminal"]
            }
        ]
    }
  1. try debug from editor button, it doesn't work. but in folder launch.json it works.

Logs

EMPTY

@byehack byehack added bug Issue identified by VS Code Team member as probable bug triage-needed Needs assignment to the proper sub-team labels Oct 6, 2021
@karthiknadig karthiknadig self-assigned this Oct 6, 2021
@karthiknadig karthiknadig removed the triage-needed Needs assignment to the proper sub-team label Oct 6, 2021
@karthiknadig karthiknadig removed their assignment Oct 6, 2021
@karthiknadig
Copy link
Member

Currently we only check the launch.json file when looking for debug-test and debug-in-terminal

@byehack
Copy link
Author

byehack commented Oct 6, 2021

also it would be great something like this for purpose:

"purpose": ["debug-in-terminal",  "debug-test", "debug-normal"]

@byehack
Copy link
Author

byehack commented Dec 9, 2021

loose files cannot have configured debug button in python: #525

It would be great to configure run/debug button for loose files:

  1. If file is in workspace but there is no launch.json: use Workspace launch settings(if it's set else ask to use LS provided settings or create/set new one. )
  2. If file is not in workspace: use launch in user settings (if it's set else ask to use LS provided settings or create/set new one. )

by these cases the priority is launch.json > Workspace > User
If none of them were set, it should show these items in quick input menu:

  • use language provided settings
  • use and remember language provided settings
  • new configuration in user settings
  • new configuration in workspace settings
  • new configuration in launch.json settings (if file isn't loose)

Originally posted by @byehack in microsoft/vscode#124280 (comment)

@eleanorjboyd
Copy link
Member

Hello! I wanted to check in to see if this is still an issue you are facing given it has been a while since you originally filed it. Thanks!

@eleanorjboyd eleanorjboyd added the info-needed Issue requires more information from poster label Dec 12, 2024
@eleanorjboyd eleanorjboyd transferred this issue from microsoft/vscode-python Dec 12, 2024
@karthiknadig
Copy link
Member

This is still a bug. Essentially, we are not looking at the settings.json for launch configs, we are only picking it up from launch.json.

@karthiknadig karthiknadig removed their assignment Dec 12, 2024
@karthiknadig karthiknadig removed the info-needed Issue requires more information from poster label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug needs PR Ready to be worked on
Projects
None yet
Development

No branches or pull requests

5 participants