mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Fix for KeyError in suspended event handle during attach (#507)
* Fix for KeyError in suspended event handle during attach * Fix typo * Address comments.
This commit is contained in:
parent
33f49c3778
commit
e69d534dae
1 changed files with 6 additions and 1 deletions
|
|
@ -2181,7 +2181,12 @@ class VSCodeMessageProcessor(VSCLifecycleMsgProcessor):
|
|||
self.pydevd_notify(pydevd_comm.CMD_THREAD_RUN, pyd_tid)
|
||||
return
|
||||
|
||||
vsc_tid = self.thread_map.to_vscode(pyd_tid, autogen=False)
|
||||
# NOTE: We should add the thread to VSC thread map only if the
|
||||
# thread is seen here for the first time in 'attach' scenario.
|
||||
# If we are here in 'launch' scenario and we get KeyError then
|
||||
# there is an issue in reporting of thread creation.
|
||||
autogen = self.start_reason == 'attach'
|
||||
vsc_tid = self.thread_map.to_vscode(pyd_tid, autogen=autogen)
|
||||
|
||||
with self.stack_traces_lock:
|
||||
self.stack_traces[pyd_tid] = xml.thread.frame
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue