forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
Description
Environment data
- VS Code version: 1.50.0
- Extension version (available under the Extensions sidebar): v2020.9.114305
- OS and version: Windows NT x64 10.0.17763
- Python version (& distribution if applicable, e.g. Anaconda): 3.9
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): virtualenv
- Relevant/affected Python packages and their versions: NA
- Relevant/affected Python-related VS Code extensions and their versions: NA
- Value of the
python.languageServer
setting: Pylance
Expected behaviour
Should execute the script
Actual behaviour
Raise an error that the cwd directory does not exist.
Steps to reproduce:
Steps to Reproduce:
- Create a structure like this one :
/
/src
/myApp
__init.py__
run.py
- in
run.py
put a very simple Python code :
if __name__ == '__main__':
print("hello")
- Create a Python debug configuration to launch the run.py file
{
// 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": [
{
"console": "integratedTerminal",
"name": "Launch",
"type": "python",
"request": "launch",
"cwd": "src",
"module": "myApp.run",
"showLog": true,
"trace": "verbose",
}
]
}
- Hit the Start debugging button
- You shall get the error indicated in the title that the
src
directory does not exist - Weirdly, after executing run.py itself as a script with the default debug configuration of vscode, I then ran again the other debug configuration (the problematic one) and it does not warn me about the
src
directory not existing. Is this expected behaviour ?
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug