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.

Debugging not possible anymore

See original GitHub issue

Environment data

  • VS Code version: Version: 1.28.2 Commit: 7f3ce96ff4729c91352ae6def877e59c561f4850 Date: 2018-10-17T00:20:56.183Z Electron: 2.0.9 Chrome: 61.0.3163.100 Node.js: 8.9.3 V8: 6.1.534.41 Architecture: x64
  • Extension version (available under the Extensions sidebar): 22.159.625 (installed from file, error also in 22.165.101)
  • OS and version: Linux Ubuntu 18.04
  • Python version (& distribution if applicable, e.g. Anaconda): 2.7
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A
  • Relevant/affected Python packages and their versions: N/A

Actual behavior

Debugging does not start: In terminal, following command is issued:

cd /<mypath> ; 
env "PYTHONPATH=/<somepath>" "PYTHONIOENCODING=UTF-8" "PYTHONUNBUFFERED=1" 
<path_to_script>/experimental/ptvsd_launcher.py --client --host localhost --port 41741 
/<path_to_script>/<myscript>.py

This results in the error output in terminal:

usage:
 <path_to_script>/experimental/ptvsd_launcher.py [-h] [-V] [--nodebug] [--host HOST | --server-host HOST] --port PORT -m MODULE [arg ...]
<path_to_script>/experimental/ptvsd_launcher.py [-h] [-V] [--nodebug] [--host HOST | --server-host HOST] --port PORT FILENAME [arg ...] 
<path_to_script>/experimental/ptvsd_launcher.py [-h] [-V] --host HOST --port PORT --pid
PROCESS_ID<path_to_script>/experimental/ptvsd_launcher.py: 
error: argument --host: expected one argument

After some time there is a timeout from the debugger: grafik

Here is the relevant launch.json part (unchanged default):

{
    // 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": [
        {
            "name": "Python: Current File (Integrated Terminal)",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
        },
     ]
}

Expected behavior

The debugger should start (as it did until yesterday) and connect.

Steps to reproduce:

  1. Take default launch.json and try to start any python script with “Python: Current File (Integrated Terminal)”

Logs

see above

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help) none

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
offerocommented, Nov 30, 2018

I’m on a mac. I think this happened because I had a version of ptvsd installed in a local venv. ptvsd is included with the python extension itself. This was fixed for me after the latest upgrade of the python extension where they prefer the built-in version of ptvsd by default.

1reaction
l327253678commented, Nov 9, 2018

You canpip install --upgrade ptvsd

Read more comments on GitHub >

github_iconTop Results From Across the Web

Debugging not possible anymore · Issue #3273 - GitHub
Debugging does not start: In terminal, following command is issued: cd /<mypath> ; env "PYTHONPATH=/<somepath>" "PYTHONIOENCODING=UTF-8" ...
Read more >
Live debugging not working anymore since Version 16.6.4
If the programm is started in debug mode and something changed while the program is paused it can't be continued. (Live debugging with...
Read more >
Troubleshoot Breakpoints in the Visual Studio Debugger
"No Symbols have been loaded for this document" ... Go to the Modules window (Debug > Windows > Modules) and check whether your...
Read more >
Debugging in VS Code suddenly stopped working
I have been using VS Code for a while, and the past week I have been working intensely in a julia code. Running...
Read more >
macos WKWebView - Debugging not possible anymore after ...
I have a macos app that mostly displays a WKWebView into which a webapp is loaded. I need to send a build of...
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