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

Threads window in experimental debugger show error call stack #3736

Closed
huguesv opened this issue Feb 13, 2018 · 0 comments
Closed

Threads window in experimental debugger show error call stack #3736

huguesv opened this issue Feb 13, 2018 · 0 comments
Assignees
Labels

Comments

@huguesv
Copy link
Contributor

huguesv commented Feb 13, 2018

See what's being displayed for the location of main thread.

Not Flagged		1	0	Worker Thread	MainThread	[Traceback (most recent call last):
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\ptvsd\ipcjson.py", line 319, in on_request
    target(request, args)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\ptvsd\wrapper.py", line 384, in f
    fut = m(self, self.loop, *args, **kwargs)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\ptvsd\futures.py", line 133, in g
    it = f(self, *args, **kwargs)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\ptvsd\wrapper.py", line 493, in on_stackTrace
    xframes = self.stack_traces[tid]
KeyError: 'pid_6920_id_2438299707656'
]

image

My code:


import multiprocessing
import threading

import sys
import time

def worker():
    time.sleep(5)
    print('worker')
    print('end')

def main():
    jobs = []
    for i in range(5):
        p = threading.Thread(target=worker)
        jobs.append(p)
        p.start()

    for j in jobs:
        j.join()


if __name__ == "__main__":
    sys.exit(int(main() or 0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants