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.

Multiprocess debugging support?

See original GitHub issue

Environment data

VS Code version: 1.18.1 Python Extension version: 0.8.0 Python Version: 3.6.3 OS and version: Microsoft Windows [Version 10.0.16299.64]

Actual behavior

Debugger is working only in main process.

Expected behavior

Debugger would stop on breakpoints in child processes.

Steps to reproduce:

  • Use this code: A.py
from multiprocessing import Process, Event

import B

if __name__ == '__main__':
    update_event = Event()
    client_proc = Process(
                args=(update_event,),
                name="client",
                target=B.TestFunc,
            )
    client_proc.start()

    import time
    time.sleep(100)

B.py

import time

def TestFunc(a):
    while True:
        time.sleep(5)
        print(a)
  • Put breakpoint on last line of B.py
  • Run debug

Logs

Output from Python output panel

Nothing special there

Output from Console window (Help->Developer Tools menu)

t.log @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:9
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:10 spawn ctags ENOENT: Error: spawn ctags ENOENT
	at exports._errnoException (util.js:1050:11)
	at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
	at onErrorNT (internal/child_process.js:367:16)
	at _combinedTickCallback (internal/process/next_tick.js:80:11)
	at process._tickCallback (internal/process/next_tick.js:104:9)
e.onUnexpectedError @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:10
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:9 [Extension Host] (node:9236) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
t.log @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:9


raw.marked.js:15 [Violation] Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider marking event handler as 'passive' to make the page more responsive.
raw.marked.js:15 [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. 
// More same output
raw.marked.js:15 [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive.
raw.marked.js:15 [Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
brettcannoncommented, Aug 20, 2018

@GandalfSaxe you will have to ask on the upstream issue.

0reactions
DonJayamannecommented, Sep 27, 2018

Closing in favor of #80

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multiprocess debugging | PyCharm Documentation
Multiprocess debugging  · Set the breakpoints in the processes to debug. · Create a Node.js run/debug configuration as described in Running and...
Read more >
Multiprocess debugging support · Issue #57 · microsoft/ptvsd
Does current version of PTVS support multi-process debugging? I didn't think it did!
Read more >
Chapter 10. Multiple Process Debugging - TechPubs
The first step in debugging multiple processes is to invoke the Debugger with the parent process. Then select Admin -> Multiprocess View from...
Read more >
Multiprocessing debug techniques - python
I'm having trouble debugging a multi-process application (specifically using a process pool in python's multiprocessing module).
Read more >
Multiprocess support for LLDB
One of its limitations is a limited support for debugging multiple processes. This project aims to address this issue in order to bring...
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