question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ptvsd debugging stopped working in latest release

See original GitHub issue

Debugging my twistd based application was working fine. It no longer does.

Environment data

  • VS Code version: 1.29.1
  • Extension version (available under the Extensions sidebar): 2018.11.0
  • OS and version: Mac OS 10.14 Mojave
  • Python version (& distribution if applicable, e.g. Anaconda): XXX
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): virtualenv
  • Relevant/affected Python packages and their versions: ptvsd

launch.json entry:

        {
            "name": "myprogram",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "/Users/offero/.virtualenvs/myvenv/bin/python",
            "program": "/Users/offero/.virtualenvs/myvenv/bin/mytwitstdprogram",
            "args": [
              "-n"
            ],
            "cwd": "${workspaceRoot}",
            "env": {},
            "envFile": "${workspaceRoot}/.env"
        }

Actual behavior

It just hangs.

Expected behavior

Debug session starts.

Steps to reproduce:

  1. Add launch.json entry
  2. Run

Logs

If I add these lines to my launch.json

            "console": "integratedTerminal",
            "stopOnEntry": false,

I get this output:

cd /Users/offero/Development/myworkspace ; env "PYTHONIOENCODING=UTF-8" "PYTHONUNBUFFERED=1" /Users/offero/.virtualenvs/myvenv/bin/python /Users/offero/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/experimental/ptvsd_launcher.py --default --client --host localhost --port 51192 /Users/offero/.virtualenvs/myvenv/bin/mytwistdprogram -n

...

asctime=2018-11-30T13:16:42 levelname=ERROR name=twistd message="Traceback (most recent call last):"
asctime=2018-11-30T13:16:42 levelname=ERROR name=twistd message="  File \"/Users/offero/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/experimental/ptvsd_launcher.py\", line 45, in <module>"
asctime=2018-11-30T13:16:42 levelname=ERROR name=twistd message="    main(ptvsdArgs)"
asctime=2018-11-30T13:16:42 levelname=ERROR name=twistd message="  File \"/Users/offero/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/experimental/ptvsd/ptvsd/__main__.py\", line 265, in main"
asctime=2018-11-30T13:16:43 levelname=ERROR name=twistd message="    wait=args.wait)"
asctime=2018-11-30T13:16:43 levelname=ERROR name=twistd message="  File \"/Users/offero/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/experimental/ptvsd/ptvsd/__main__.py\", line 258, in handle_args"
asctime=2018-11-30T13:16:43 levelname=ERROR name=twistd message="    debug_main(addr, name, kind, *extra, **kwargs)"
asctime=2018-11-30T13:16:43 levelname=ERROR name=twistd message="  File \"/Users/offero/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/experimental/ptvsd/ptvsd/_local.py\", line 45, in debug_main"
asctime=2018-11-30T13:16:43 levelname=ERROR name=twistd message="    run_file(address, name, *extra, **kwargs)"
asctime=2018-11-30T13:16:43 levelname=ERROR name=twistd message="  File \"/Users/offero/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/experimental/ptvsd/ptvsd/_local.py\", line 79, in run_file"
asctime=2018-11-30T13:16:43 levelname=ERROR name=twistd message="    run(argv, addr, **kwargs)"
asctime=2018-11-30T13:16:43 levelname=ERROR name=twistd message="  File \"/Users/offero/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/experimental/ptvsd/ptvsd/_local.py\", line 140, in _run"
asctime=2018-11-30T13:16:43 levelname=ERROR name=twistd message="    _pydevd.main()"
asctime=2018-11-30T13:16:43 levelname=ERROR name=twistd message="  File \"/Users/offero/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/experimental/ptvsd/ptvsd/_vendored/pydevd/pydevd.py\", line 1925, in main"
asctime=2018-11-30T13:16:43 levelname=ERROR name=twistd message="    debugger.connect(host, port)"
asctime=2018-11-30T13:16:43 levelname=ERROR name=twistd message="TypeError: 'NoneType' object is not callable"
[1]    56333 terminated  env "PYTHONIOENCODING=UTF-8" "PYTHONUNBUFFERED=1"   --default --client --host

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
dvirtzcommented, Jan 10, 2019

https://github.com/Microsoft/ptvsd/issues/987 has been fixed. When can we expect this to be released?

3reactions
ftrofincommented, Dec 19, 2018

I have the same problem with the latest version: VS Code Mac 1.30.1 on macOS 10.14.1 and Python extension 2018.12.1. This renders debugging Python code basically useless. Please fix!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ptvsd debugging stopped working in latest release · Issue #3520 ...
Debugging my twistd based application was working fine. It no longer does. Environment data. VS Code version: 1.29.1; Extension version (available under the ......
Read more >
Visual Studio Python debug: Unable to get stopped location ...
I'm using Visual Studio 2017 and python 3.6 through Anaconda installation. In this situation, I'm running in a virtual environment, created specifically for ......
Read more >
ptvsd - PyPI
Remote debugging server for Python support in Visual Studio and Visual Studio Code.
Read more >
Visual Studio does not use current PTVSD version
Long story short. Utilize legacy debugger. This was the only option which worked for me in conjunction with Python 3.4 and Microsoft Visual ......
Read more >
PTVSD - Remote debugger support for Visual Studio Code ...
Current status: I can't get it working (see error log below) and ... pydev debugger: CRITICAL WARNING: This version of python seems to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found