-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
After the last update, some parts of the debugger stop working. The setup is not simple, with multiple folders in the workspace, specific CWD in lauch.json, but it runs fine until version 2019.4.12954, but broke on update to 2019.5.17059.
I will try to give further details, like a minimal reproducible example, but due time constraints I'll give the minimum to report the bug.
Environment data
-
VS Code version:
Version: 1.34.0
Commit: a622c65b2c713c890fcf4fbf07cf34049d5fe758
Date: 2019-05-15T21:55:35.507Z
Electron: 3.1.8
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Linux x64 5.0.16-300.fc30.x86_64 -
Extension version:
[BROKEN VERSION]
Name: Python
Id: ms-python.python
Description: Linting, Debugging (multi-threaded, remote), Intellisense, code formatting, refactoring, unit tests, snippets, and more.
Version: 2019.5.17059
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-python.python
[LATEST WORKING VERSION]
Version: 2019.4.12954 -
OS and version: GNU/Linux Fedora 30 64bit
-
Python version: Python 3.7.3
Expected behaviour x Actual behaviour
After the upgrade, the debugger is somehow broken. Roughly, the CWD or source code mapping is trying the wrong path. The debugger starts, but when you try to set a breakpoint, it shows up in the console:
pydev debugger: warning: trying to add breakpoint to file that does not exist: /home/user/work/company/project/back-end/project/back-end/app.py (will have no effect)
The correct path would be /home/user/work/company/project/back-end/app.py. Also, if you set up a breakpoint in a line before the debugger starts, it does not break on it when running.
My workspace have multiple folders, and my configuration on laucher sets CWD. I tried to adapt the launcher.json config to work on the new version, like removing the cwd in the laucher setting. It fixed this issue, but broke other stuff.
I tried this with fresh settings, and with all extensions disabled except the Python one.
Some parts (the relevant ones) of my workspace settings file. The file is in root_workspace/misc/project.code-workspace. More on the files tree above.
{
"folders": [
{
"path": "..",
},
{
"name": "backend",
"path": "../project/back-end",
},
{
"name": "frontend/src",
"path": "../project/front-end/src",
},
{
"path": "../libforproject",
}
],
"settings": {
"terminal.integrated.env.linux": {
"PYTHONPATH": "${workspaceFolder:libforproject}",
},
}
}
My .vscode/launch.json file (relevant parts):
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: backend",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}/project/back-end/",
// "envFile": "${workspaceFolder}/data/pg.prod.env",
"envFile": "${workspaceFolder}/data/pg.dev.env",
"env": {
"PROJECT_REALOAD": "FALSE",
},
"program": "${workspaceFolder}/project/back-end/app.py",
"console": "integratedTerminal"
},
]
}
PS: I renamed some names like my username or project name.
Also, if it can help, the redacted file tree of the project. I remove irrelevant parts. Generated by $ tree.
.
├── TODO
├── backend.rest
├── data
│ ├── doc
(...)
│ ├── jupyter
(...)
│ ├── pg.dev.env
│ ├── pg.prod.env
│ └── pg_db
(...)
├── project
│ ├── README.md
│ ├── back-end
│ │ ├── Dockerfile
│ │ ├── Dockerfile-dev
│ │ ├── app.py
│ │ ├── app_factory.py
│ │ ├── bottle.py -> /usr/local/lib/python3.7/site-packages/bottle.py
│ │ ├── module1
│ │ │ ├── __init__.py
│ │ │ (...)
│ │ ├── database.py
│ │ ├── module2
│ │ │ ├── __init__.py
│ │ │ ├── file1.py
│ │ │ ├── file2.py
│ │ │ ├── file3.py
│ │ │ ├── log.py
│ │ │ ├── logging.ini
│ │ ├── libproject
│ │ │ ├── __init__.py
│ │ │ ├── libproject.py
│ │ │ ├── file1.py
│ │ │ ├── file2.py
│ │ │ ├── file3.py
│ │ │ ├── pyproject.toml
│ │ ├── module3
│ │ │ ├── __init__.py
│ │ │ ├── base.py
│ │ │ ├── mod1.py
│ │ │ ├── mod2.py
│ │ │ ├── mod3.py
│ │ │ └── mod4.py
│ │ ├── somelib -> ../libs/somelib/somelib
│ │ ├── module4
│ │ │ ├── __init__.py
│ │ │ ├── file1.py
│ │ │ ├── file2.py
│ │ │ ├── file3.py
│ │ │ ├── file4.py
│ │ │ ├── file5.py
│ │ ├── requirements-dev.txt
│ │ ├── requirements.txt
│ │ ├── another_file.py
│ │ ├── module5
│ │ │ ├── __init__.py
│ │ │ ├── file1.py
│ │ │ ├── file2.py
│ │ │ ├── file3.py
│ │ │ ├── file4.py
│ │ │ ├── file5.py
│ │ │ ├── file6.py
│ │ ├── tests
│ │ │ ├── __init__.py
│ │ │ ├── test_1.py
│ │ │ └── test_2.py
│ ├── docker-compose.yml
│ ├── front-end
│ │ ├── Dockerfile
│ │ ├── node_modules
(...)
│ │ ├── package-lock.json
│ │ ├── package.json
│ │ ├── public
(...)
│ │ ├── src
(...)
│ │ └── yarn.lock
│ ├── libs
│ └────── somelib
(...)
├── docker-compose.yml
├── libproject
│ ├── __init__.py
│ ├── jupyter
│ │ ├── filefile01.ipynb
│ │ ├── filefile02.ipynb
│ │ └── filefile03.ipynb
│ ├── libproject.py
│ ├── file1.py
│ ├── file2.py
│ ├── file3.py
│ ├── pyproject.toml
│ ├── test_all.py
│ └── tests
│ ├── __init__.py
│ └── test_1.py
├── misc
│ ├── project.code-workspace
5404 directories, 38902 files
Logs
Output for Python in the Output panel
Starting Jedi Python language engine.
##########Linting Output - pylint##########
************* Module app
86,11,error,no-member:Method 'app' has no 'default_error_handler' member
93,11,error,no-member:Method 'app' has no 'default_error_handler' member
100,11,error,no-member:Method 'app' has no 'default_error_handler' member
107,11,error,no-member:Method 'app' has no 'default_error_handler' member
------------------------------------------------------------------
Your code has been rated at 7.96/10 (previous run: 7.96/10, +0.00)