Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Debugger stopped working after last update, no stack trace? #1972

Closed
ghost opened this issue Dec 6, 2019 · 6 comments
Closed

Debugger stopped working after last update, no stack trace? #1972

ghost opened this issue Dec 6, 2019 · 6 comments

Comments

@ghost
Copy link

ghost commented Dec 6, 2019

Environment data

From the about dialog
Version: 1.40.2
Commit: f359dd69833dd8800b54d458f6d37ab7c78df520
Date: 2019-11-25T14:54:40.719Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Linux x64 5.3.7-050307-generic snap

Ubunut 18.04
Python 3.6.8-64bit

launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Run All Tests",
            "type": "python",
            "request": "launch",
            "module": "pytest"
        }
    ]
}

Expected behaviour

Run test in debugger

Actual behaviour

gives me the following output

...
APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL=true VSCODE_CLI=1 ELECTRON_NO_ATTACH_CONSOLE=1 NO_AT_BRIDGE=1 CHROME_DESKTOP=code-url-handler.desktop 'VSCODE_NLS_CONFIG={"locale":"en-gb","availableLanguages":{},"_languagePackSupport":true}' VSCODE_NODE_CACHED_DATA_DIR=/home/alex/.config/Code/CachedData/f359dd69833dd8800b54d458f6d37ab7c78df520 VSCODE_LOGS=/home/alex/.config/Code/logs/20191206T130433 VSCODE_IPC_HOOK=/run/user/1000/snap.code/vscode-d32d3ff9-1.40.2-main.sock VSCODE_PID=8850 AMD_ENTRYPOINT=vs/workbench/services/extensions/node/extensionHostProcess PIPE_LOGGING=true VERBOSE_LOGGING=true VSCODE_IPC_HOOK_EXTHOST=/tmp/vscode-ipc-45ac6eb7-3ae3-4d36-b119-40520381f570.sock VSCODE_HANDLES_UNCAUGHT_ERRORS=true VSCODE_LOG_STACK=false PATH=/home/alex/dev/concourse_server/__venv__/bin:/home/alex/dev/go/bin:/usr/local/go/bin:/home/alex/.local/bin:/home/alex/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin PYTHONIOENCODING=UTF-8 PYTHONUNBUFFERED=1 /home/alex/dev/concourse_server/__venv__/bin/python /home/alex/.vscode/extensions/ms-python.python-2019.11.50794/pythonFiles/ptvsd_launcher.py --default --client --host localhost --port 45991 -m pytest 
============================================================================ test session starts =============================================================================
platform linux -- Python 3.6.8, pytest-5.2.1, py-1.8.0, pluggy-0.13.0
rootdir: /home/alex/dev/imagr/concourse_server
collected 0 items / 1 errors                                                                                                                                                 INTERNALERROR> Traceback (most recent call last):
Traceback (most recent call last):


During handling of the above exception, another exception occurred:



During handling of the above exception, another exception occurred:



During handling of the above exception, another exception occurred:


Terminated

As you can see its not reporting the problem :-?

Steps to reproduce:

It was working until recently. I think the last auto update might have coursed it...?
Why would it not be showing the track trace?
Works fine from a terminal running python -m pytest

@ghost ghost changed the title Debugger stopped working after last update? Debugger stopped working after last update, no stack trace? Dec 6, 2019
@karthiknadig
Copy link
Member

@whillas can you share the debugger command from the terminal?

@ghost
Copy link
Author

ghost commented Dec 8, 2019

@karthiknadig not sure what you mean? I'm running the command via F5 with the launch.json as above. The complete command is above but you have to scroll right as it seems to all the environmental variables are pretended to the command. i.e.

09:55 $ cd /home/alex/dev/project/server ; env ELECTRON_RUN_AS_NODE=1 CLUTTER_IM_MODULE=xim 'LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:' 'LESSCLOSE=/usr/bin/lesspipe %s %s' XDG_MENU_PREFIX=gnome- SNAP_USER_DATA=/home/alex/snap/code/21 LANG=en_NZ.UTF-8 DISPLAY=:0 OLDPWD=/home/alex GNOME_SHELL_SESSION_MODE=ubuntu SNAP_REVISION=21 DISABLE_WAYLAND=1 SNAP_ARCH=amd64 SNAP_INSTANCE_KEY= COLORTERM=truecolor GOOGLE_APPLICATION_CREDENTIALS=/home/alex/.config/gcloud/project-ml-terraform-admin.json DESKTOP_AUTOSTART_ID=10bccfbb15fb78a135157560966635110900000031090022 USERNAME=alex XDG_VTNR=2 SSH_AUTH_SOCK=/run/user/1000/keyring/ssh VIRTUAL_ENV=/home/alex/dev/project/server/__venv__ XDG_SESSION_ID=2 SNAP_USER_COMMON=/home/alex/snap/code/common USER=alex DESKTOP_SESSION=ubuntu QT4_IM_MODULE=xim GOPATH=/home/alex/dev/go TEXTDOMAINDIR=/usr/share/locale/ GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/48738d92_f396_4546_9f29_407f44dc1934 PWD=/home/alex/dev/project/server HOME=/home/alex GOROOT=/usr/local/go TEXTDOMAIN=im-config SNAP=/snap/code/21 SSH_AGENT_PID=3207 __GIT_PROMPT_SHOW_UNTRACKED_FILES= QT_ACCESSIBILITY=1 SNAP_COMMON=/var/snap/code/common XDG_SESSION_TYPE=x11 SNAP_NAME=code XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop SNAP_INSTANCE_NAME=code SNAP_DATA=/var/snap/code/21 GSETTINGS_SCHEMA_DIR=/snap/code/21/usr/share/glib-2.0/schemas XDG_SESSION_DESKTOP=ubuntu GDK_PIXBUF_MODULE_FILE=/home/alex/snap/code/common/.cache/gdk-pixbuf-loaders.cache GTK_MODULES=gail:atk-bridge SNAP_COOKIE=rHrgdCcx3VRghkSFFY2LwKvYkB1RwMDDslfr6x4mTVbP WINDOWPATH=2 TERM=xterm-256color SHELL=/bin/bash VTE_VERSION=5202 QT_IM_MODULE=ibus XMODIFIERS=@im=ibus IM_CONFIG_PHASE=2 XDG_CURRENT_DESKTOP=Unity GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1 SNAP_REEXEC= GNOME_TERMINAL_SERVICE=:1.66 XDG_SEAT=seat0 SHLVL=2 LANGUAGE=en_NZ:en GIT_BRANCH=master GDK_PIXBUF_MODULEDIR=/snap/code/21/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders GDMSESSION=ubuntu GNOME_DESKTOP_SESSION_ID=this-is-deprecated XDG_CACHE_HOME=/home/alex/snap/code/common/.cache LOGNAME=alex DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus MLFLOW_TRACKING_URI=http://192.168.1.25:5000 XDG_RUNTIME_DIR=/run/user/1000/snap.code XAUTHORITY=/run/user/1000/gdm/Xauthority SNAP_CONTEXT=rHrgdCcx3VRghkSFFY2LwKvYkB1RwMDDslfr6x4mTVbP XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg SNAP_VERSION=f359dd69 SNAP_LIBRARY_PATH=/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void SESSION_MANAGER=local/carbon:@/tmp/.ICE-unix/3109,unix/carbon:/tmp/.ICE-unix/3109 'LESSOPEN=| /usr/bin/lesspipe %s' GTK_IM_MODULE=ibus _=/snap/code/21/usr/share/code/bin/../code APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL=true VSCODE_CLI=1 ELECTRON_NO_ATTACH_CONSOLE=1 NO_AT_BRIDGE=1 CHROME_DESKTOP=code-url-handler.desktop 'VSCODE_NLS_CONFIG={"locale":"en-gb","availableLanguages":{},"_languagePackSupport":true}' VSCODE_NODE_CACHED_DATA_DIR=/home/alex/.config/Code/CachedData/f359dd69833dd8800b54d458f6d37ab7c78df520 VSCODE_LOGS=/home/alex/.config/Code/logs/20191206T182234 VSCODE_IPC_HOOK=/run/user/1000/snap.code/vscode-d32d3ff9-1.40.2-main.sock VSCODE_PID=4803 AMD_ENTRYPOINT=vs/workbench/services/extensions/node/extensionHostProcess PIPE_LOGGING=true VERBOSE_LOGGING=true VSCODE_IPC_HOOK_EXTHOST=/tmp/vscode-ipc-10a64349-4514-4578-83de-241836c93d7c.sock VSCODE_HANDLES_UNCAUGHT_ERRORS=true VSCODE_LOG_STACK=false PATH=/home/alex/dev/project/server/__venv__/bin:/home/alex/dev/go/bin:/usr/local/go/bin:/home/alex/.local/bin:/home/alex/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin PYTHONIOENCODING=UTF-8 PYTHONUNBUFFERED=1 /home/alex/dev/project/server/__venv__/bin/python /home/alex/.vscode/extensions/ms-python.python-2019.11.50794/pythonFiles/ptvsd_launcher.py --default --client --host localhost --port 40977 -m pytest tests/test_handlers_masking.py 

i.e. scroll left plz

@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python Dec 9, 2019
@int19h
Copy link
Contributor

int19h commented Dec 9, 2019

Is it specific to pytest, or are you seeing the same when trying to run e.g. a simple hello world type app?

@ghost
Copy link
Author

ghost commented Dec 9, 2019

yup, seems to run print("Hello world") just fine. I've setup another project and it works fine for pytest. I guess its something to do with the project and pytest. I reinstalled the later and no cigar. I can start to remove things and see if it starts to run again...?
With all tests removed it still hits this problem.
I'm guessing that the reason there is no stack trace is because pytest is capturing it. And something goes wrong between starting pytests output capture and the running of the tests...?
YES! I passed the -s and i get the following output (but don't know what it means):

collecting ... E00000.948: Exception escaped from start_client

            Traceback (most recent call last):
              File "/home/alex/.vscode/extensions/ms-python.python-2019.11.50794/pythonFiles/lib/python/old_ptvsd/ptvsd/log.py", line 110, in g
                return f(*args, **kwargs)
              File "/home/alex/.vscode/extensions/ms-python.python-2019.11.50794/pythonFiles/lib/python/old_ptvsd/ptvsd/pydevd_hooks.py", line 74, in start_client
                sock, start_session = daemon.start_client((host, port))
              File "/home/alex/.vscode/extensions/ms-python.python-2019.11.50794/pythonFiles/lib/python/old_ptvsd/ptvsd/daemon.py", line 214, in start_client
                with self.started():
              File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
                return next(self.gen)
              File "/home/alex/.vscode/extensions/ms-python.python-2019.11.50794/pythonFiles/lib/python/old_ptvsd/ptvsd/daemon.py", line 110, in started
                self.start()
              File "/home/alex/.vscode/extensions/ms-python.python-2019.11.50794/pythonFiles/lib/python/old_ptvsd/ptvsd/daemon.py", line 145, in start
                raise RuntimeError('already started')
            RuntimeError: already started

But I'm not using multiprocessing...?

@ghost
Copy link
Author

ghost commented Dec 11, 2019

Ok, looks like it has something to do with zeromq. Even though none of my tests are testing code related to it.
Ya, making sure the tests were not pulling in any of that code. Might also be some multi processing that going on around that code.

@ghost ghost closed this as completed Dec 11, 2019
@int19h
Copy link
Contributor

int19h commented Dec 11, 2019

Ultimately, this will get fixed once we ship #1706.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants