Skip to content

Debugger doesn't start if LANG is set to non-existent locale #87

@lorenzo-cavazzi

Description

@lorenzo-cavazzi

Environment data

  • VS Code version: 1.43.1
  • Extension version: 2020.3.69010
  • OS: Linux x64 5.5.11-1-MANJARO
  • Python version: 3.8.2 (system), 3.7.5 (pipenv, used in the referenced repo)
  • Type of virtual environment used: virtualenv
  • Jedi or Language Server? Jedi enabled
  • Value of the python.languageServer setting: "python.languageServer": "Microsoft"

Expected behaviour

Being able to debug pytest and hit breakpoints.

Actual behaviour

When I click on "Debug test", the debug interface quickly starts (I end up in the "Run" tab and I can see the "play", "stop", ... buttons on top right) but it stops after less than a second without hitting the breakpoint and without completing the test.
Using "Run Test" works as expected and the test run and is marked as passed.

Steps to reproduce:

P.S: this is my settings.json

{
    "python.pythonPath": "/home/lorenzo/.local/share/virtualenvs/renku-python-WcnE3QeY/bin/python",
    "python.testing.unittestEnabled": false,
    "python.testing.nosetestsEnabled": false,
    "python.testing.pytestEnabled": true,
    "python.testing.pytestArgs": ["--no-cov"],
    "python.linting.pylintEnabled": false,
    "python.linting.flake8Enabled": true,
    "python.linting.enabled": true,
	"python.formatting.provider": "yapf"
}

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

I don't see any output in "Output --> Python" nor in "Python Test Log" after clicking on "Debug test".
When I start VSCode and I select the file containing the test, I see the following

User belongs to experiment group 'ShowPlayIcon - start'
User belongs to experiment group 'ShowExtensionSurveyPrompt - control'
User belongs to experiment group 'DebugAdapterFactory - experiment'
User belongs to experiment group 'PtvsdWheels37 - experiment'
User belongs to experiment group 'Reload - control'
User belongs to experiment group 'LS - control'
User belongs to experiment group 'UseTerminalToGetActivatedEnvVars - control'
User belongs to experiment group 'WebHostNotebook - control'
User belongs to experiment group 'CollectLSRequestTiming - control'
User belongs to experiment group 'CollectNodeLSRequestTiming - experiment'
> conda --version
> conda info --json
> pyenv root
> python3.7 -c "import sys;print(sys.executable)"
> python3.6 -c "import sys;print(sys.executable)"
> python3 -c "import sys;print(sys.executable)"
> python2 -c "import sys;print(sys.executable)"
> python -c "import sys;print(sys.executable)"
> ~/.local/share/virtualenvs/renku-python-WcnE3QeY/bin/python -c "import sys;print(sys.executable)"
> ~/.local/share/virtualenvs/renku-notebooks-4n1SxYW5/bin/python -c "import jupyter"
> ~/.local/share/virtualenvs/renku-notebooks-4n1SxYW5/bin/python -c "import notebook"
> ~/.local/share/virtualenvs/renku-notebooks-4n1SxYW5/bin/python -m jupyter kernelspec --version
> pipenv --version
cwd: ~/development/sdsc/renku-python
> conda env list
> conda env list
> pipenv --venv
cwd: ~/development/sdsc/renku-python
Starting Jedi Python language engine.
> conda --version
> ~/.local/share/virtualenvs/renku-python-WcnE3QeY/bin/python ~/.vscode-oss/extensions/ms-python.python-2020.3.69010/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir ~/development/sdsc/renku-python -s --cache-clear --no-cov
cwd: ~/development/sdsc/renku-python
> pipenv --py
cwd: ~/development/sdsc/renku-python
> pipenv --version
cwd: ~/development/sdsc/renku-python
> ~/.local/share/virtualenvs/renku-python-WcnE3QeY/bin/python -c "import sys;print(sys.prefix)"
cwd: ~/development/sdsc/renku-python
> ~/.local/share/virtualenvs/renku-python-WcnE3QeY/bin/python -c "import sys;print(sys.prefix)"
cwd: ~/development/sdsc/renku-python
> ~/.local/share/virtualenvs/renku-python-WcnE3QeY/bin/python -c "import sys;print(sys.executable)"
cwd: ~/development/sdsc/renku-python
> ~/.local/share/virtualenvs/renku-python-WcnE3QeY/bin/python -c "import sys;print(sys.executable)"
cwd: ~/development/sdsc/renku-python
> ~/.local/share/virtualenvs/renku-python-WcnE3QeY/bin/python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
cwd: ~/development/sdsc/renku-python
> ~/.local/share/virtualenvs/renku-python-WcnE3QeY/bin/python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
cwd: ~/development/sdsc/renku-python
> ~/.local/share/virtualenvs/renku-python-WcnE3QeY/bin/python -m site --user-site
cwd: ~/development/sdsc/renku-python
> ~/.local/share/virtualenvs/renku-python-WcnE3QeY/bin/python -m site --user-site
cwd: ~/development/sdsc/renku-python
> ~/.local/share/virtualenvs/renku-python-WcnE3QeY/bin/python completion.py
cwd: ~/.vscode-oss/extensions/ms-python.python-2020.3.69010/pythonFiles
> ~/.local/share/virtualenvs/renku-python-WcnE3QeY/bin/python completion.py
cwd: ~/.vscode-oss/extensions/ms-python.python-2020.3.69010/pythonFiles
> pipenv --venv
cwd: ~/development/sdsc/renku-python
> ~/.local/share/virtualenvs/renku-python-WcnE3QeY/bin/python -m flake8 --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s ~/development/sdsc/renku-python/tests/core/management/test_repository.py
cwd: ~/development/sdsc/renku-python
> ~/.local/share/virtualenvs/renku-python-WcnE3QeY/bin/python -m flake8 --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s ~/development/sdsc/renku-python/tests/core/management/test_repository.py
cwd: ~/development/sdsc/renku-python
##########Linting Output - flake8##########
> pipenv --py
cwd: ~/development/sdsc/renku-python

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

  ERR timeout after 500 ms: Error: timeout after 500 ms
    at t.RawDebugSession.handleErrorResponse (file:///usr/lib/code/out/vs/workbench/workbench.desktop.main.js:2954:952)
    at file:///usr/lib/code/out/vs/workbench/workbench.desktop.main.js:2954:250
    at async t.RawDebugSession.shutdown (file:///usr/lib/code/out/vs/workbench/workbench.desktop.main.js:2952:336)

Not sure if relevant, but I also add the error I see in "Log Window" -- sometimes only the first of the 2 errors is reported

[2020-03-25 15:05:19.148] [renderer1] [error] timeout after 500 ms: Error: timeout after 500 ms
    at t.RawDebugSession.handleErrorResponse (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:2954:952)
    at file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:2954:250
    at async t.RawDebugSession.shutdown (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:2952:336)
[2020-03-25 15:05:20.859] [renderer1] [error] TreeError [CustomView] Data tree node not found: [object Object]: Error: TreeError [CustomView] Data tree node not found: [object Object]
    at H.getDataNode (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:1097:771)
    at H._updateChildren (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:1095:64)
    at H.updateChildren (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:1094:798)
    at file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:5773:30
    at Array.map (<anonymous>)
    at G.doRefresh (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:5773:21)
    at G.refresh (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:5772:111)
    at p.$refresh (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:3671:510)
    at g._doInvokeHandler (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:3681:363)
    at g._invokeHandler (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:3681:55)
    at g._receiveRequest (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:3679:739)
    at g._receiveOneMessage (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:3678:518)
    at file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:3676:754
    at c.fire (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:110:24)
    at v.fire (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:382:801)
    at t.PersistentProtocol._receiveMessage (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:387:276)
    at file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:384:321
    at c.fire (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:110:24)
    at g.acceptChunk (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:380:306)
    at file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:379:657
    at Socket.t (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:390:450)
    at Socket.emit (events.js:203:13)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:276:11)
    at Socket.Readable.push (_stream_readable.js:210:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:166:17)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions