Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiprocess debugging support? #314

Closed
Zloool opened this issue Nov 28, 2017 · 7 comments
Closed

Multiprocess debugging support? #314

Zloool opened this issue Nov 28, 2017 · 7 comments
Labels
area-debugging feature-request Request for new features or functionality

Comments

@Zloool
Copy link

Zloool commented Nov 28, 2017

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.
@brettcannon brettcannon added awaiting 1-verification area-debugging bug Issue identified by VS Code Team member as probable bug labels Nov 28, 2017
@brettcannon
Copy link
Member

I'm pretty sure that multi-process support isn't in ptvsd, but @DonJayamanne might know better than I do.

@DonJayamanne
Copy link

DonJayamanne commented Nov 28, 2017

Unfortunately no, multi process debugging is currently not supported.

@DonJayamanne DonJayamanne added awaiting 1-decision feature-request Request for new features or functionality and removed awaiting 1-verification bug Issue identified by VS Code Team member as probable bug labels Nov 28, 2017
@Zloool
Copy link
Author

Zloool commented Nov 28, 2017

Thanks for the answer @DonJayamanne , will switch to multithreading for debug purposes.

@DonJayamanne
Copy link

Upstream issue microsoft/ptvsd#57

@gandalfsaxe
Copy link

gandalfsaxe commented Aug 17, 2018

Will this issue also cover Python multiprocessing's Pool().map?

https://docs.python.org/3.4/library/multiprocessing.html

@brettcannon
Copy link
Member

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

@DonJayamanne
Copy link

Closing in favor of #80

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-debugging feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

4 participants