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.

Debug stop working with modules on version 2018.10.x

See original GitHub issue

Environment data

  • VS Code version:
code --version
1.28.2
7f3ce96ff4729c91352ae6def877e59c561f4850
x64

or

code-insiders --version
1.29.0-insider
5f24c93878bd4bc645a4a17c620e2487b11005f9
x64
  • Extension version (available under the Extensions sidebar): - OS and version: ubuntu 18.04
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.6
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A
  • Relevant/affected Python packages and their versions:

Actual behavior

debugger not working with modules

image

Expected behavior

debugger should work with modules back again… like in version 2018.09. ~~ I am not able to rollback python ext, in current vscode stable and insiders version.~~

Steps to reproduce:

  1.          "name": "Python: Module",
             "type": "python",
             "request": "launch",
             "module": "qconsumer",
             "console": "integratedTerminal"
         },```
    

or

{
            "name": "Python: Current File (Integrated Terminal)",
            "type": "python",
            "request": "launch",
            "program": "${workspaceFolder}/qconsumer/__main__.py",
            "console": "integratedTerminal",
        },```

2. press f5

## Logs
Output for `Python` in the `Output` panel (`View`→`Output`, change the drop-down the upper-right of the `Output` panel to `Python`)

output

Starting Microsoft Python language server. Microsoft Python Language Server version 0.1.60.0 Initializing for /usr/bin/python3 ##########Linting Output - pylint##########


Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

##########Linting Output - pylint##########


Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

##########Linting Output - pylint##########


Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)


terminal

cd /home/gustavo/github/consumerq-svc ; env “PYTHONIOENCODING=UTF-8” “PYTHONUNBUFFERED=1” /usr/bin/python3 /home/gustavo/.vscode/extensions/ms-python.python-2018.10.1/pythonFiles/experimental/ptvsd_launcher.py --client --host localhost --port 41131 /home/gustavo/github/consumerq-svc/qconsumer/main.py Traceback (most recent call last): File “/home/gustavo/.vscode/extensions/ms-python.python-2018.10.1/pythonFiles/experimental/ptvsd_launcher.py”, line 38, in <module> main(sys.argv) File “/home/gustavo/.vscode/extensions/ms-python.python-2018.10.1/pythonFiles/experimental/ptvsd/ptvsd/main.py”, line 265, in main wait=args.wait) File “/home/gustavo/.vscode/extensions/ms-python.python-2018.10.1/pythonFiles/experimental/ptvsd/ptvsd/main.py”, line 258, in handle_args debug_main(addr, name, kind, *extra, **kwargs) File “/home/gustavo/.vscode/extensions/ms-python.python-2018.10.1/pythonFiles/experimental/ptvsd/ptvsd/_local.py”, line 45, in debug_main run_file(address, name, *extra, **kwargs) File “/home/gustavo/.vscode/extensions/ms-python.python-2018.10.1/pythonFiles/experimental/ptvsd/ptvsd/_local.py”, line 79, in run_file run(argv, addr, **kwargs) File “/home/gustavo/.vscode/extensions/ms-python.python-2018.10.1/pythonFiles/experimental/ptvsd/ptvsd/_local.py”, line 140, in _run _pydevd.main() File “/home/gustavo/.vscode/extensions/ms-python.python-2018.10.1/pythonFiles/experimental/ptvsd/ptvsd/_vendored/pydevd/pydevd.py”, line 1925, in main debugger.connect(host, port) File “/home/gustavo/.vscode/extensions/ms-python.python-2018.10.1/pythonFiles/experimental/ptvsd/ptvsd/_vendored/pydevd/pydevd.py”, line 1283, in run return self._exec(is_module, entry_point_fn, module_name, file, globals, locals) File “/home/gustavo/.vscode/extensions/ms-python.python-2018.10.1/pythonFiles/experimental/ptvsd/ptvsd/_vendored/pydevd/pydevd.py”, line 1290, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File “/home/gustavo/.vscode/extensions/ms-python.python-2018.10.1/pythonFiles/experimental/ptvsd/ptvsd/_vendored/pydevd/_pydev_imps/_pydev_execfile.py”, line 25, in execfile exec(compile(contents+“\n”, file, ‘exec’), glob, loc) File “/home/gustavo/github/consumerq-svc/qconsumer/main.py”, line 13, in <module> from qconsumer.runnables import runnable ModuleNotFoundError: No module named ‘qconsumer’


insiders

Traceback (most recent call last): File “/home/gustavo/.vscode-insiders/extensions/ms-python.python-2018.10.1/pythonFiles/experimental/ptvsd_launcher.py”, line 38, in <module> main(sys.argv) File “/home/gustavo/.vscode-insiders/extensions/ms-python.python-2018.10.1/pythonFiles/experimental/ptvsd/ptvsd/main.py”, line 265, in main wait=args.wait) File “/home/gustavo/.vscode-insiders/extensions/ms-python.python-2018.10.1/pythonFiles/experimental/ptvsd/ptvsd/main.py”, line 258, in handle_args debug_main(addr, name, kind, *extra, **kwargs) File “/home/gustavo/.vscode-insiders/extensions/ms-python.python-2018.10.1/pythonFiles/experimental/ptvsd/ptvsd/_local.py”, line 45, in debug_main run_file(address, name, *extra, **kwargs) File “/home/gustavo/.vscode-insiders/extensions/ms-python.python-2018.10.1/pythonFiles/experimental/ptvsd/ptvsd/_local.py”, line 79, in run_file run(argv, addr, **kwargs) File “/home/gustavo/.vscode-insiders/extensions/ms-python.python-2018.10.1/pythonFiles/experimental/ptvsd/ptvsd/_local.py”, line 140, in _run _pydevd.main() File “/home/gustavo/.vscode-insiders/extensions/ms-python.python-2018.10.1/pythonFiles/experimental/ptvsd/ptvsd/_vendored/pydevd/pydevd.py”, line 1925, in main debugger.connect(host, port) File “/home/gustavo/.vscode-insiders/extensions/ms-python.python-2018.10.1/pythonFiles/experimental/ptvsd/ptvsd/_vendored/pydevd/pydevd.py”, line 1283, in run return self._exec(is_module, entry_point_fn, module_name, file, globals, locals) File “/home/gustavo/.vscode-insiders/extensions/ms-python.python-2018.10.1/pythonFiles/experimental/ptvsd/ptvsd/_vendored/pydevd/pydevd.py”, line 1290, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File “/home/gustavo/.vscode-insiders/extensions/ms-python.python-2018.10.1/pythonFiles/experimental/ptvsd/ptvsd/_vendored/pydevd/_pydev_imps/_pydev_execfile.py”, line 25, in execfile exec(compile(contents+“\n”, file, ‘exec’), glob, loc) File “/home/gustavo/github/consumerq-svc/qconsumer/main.py”, line 13, in <module> from qconsumer.runnables import runnable ModuleNotFoundError: No module named ‘qconsumer’


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

workbench.main.js:sourcemap:225 [Violation] Added non-passive event listener to a scroll-blocking ‘mousewheel’ event. Consider marking event handler as ‘passive’ to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:10

github_iconTop GitHub Comments

12reactions
DonJayamannecommented, Nov 12, 2018

@sharkguto As a temporary solution you can update your launch.json as follows:

"env":{
	"PYTHONPATH":"${workspaceFolder}"
}
10reactions
DonJayamannecommented, Nov 14, 2018

As a temporary solution, please add the following into your launch.json

	"env": {
		"PYTHONPATH": "${workspaceFolder}"
	}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to debug with latest version of ptvsd with pydevd 1.4.0
Expected behavior. Debugger should start and function as normal. This worked fine until the latest version of vscode (last week??) Steps to ...
Read more >
Unable to debug when we are selecting module from 'Entry ...
Hi All,. We have upgraded our platform to version 11 and after that we are unable to debug when we are selecting module...
Read more >
Troubleshoot Breakpoints in the Visual Studio Debugger
Go to the Modules window (Debug > Windows > Modules) and check whether your module is loaded. If your module is loaded, check...
Read more >
Android Studio's debugger not stopping at breakpoints within ...
As the project just has one single activity class in the app module and everything else is provided within library modules in fact...
Read more >
Troubleshooting common PHP debugging issues | PhpStorm ...
This section provides the list of solutions and workarounds for common problems with Debugging in PhpStorm.
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