mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Merge pull request #51 from karthiknadig/bugs
Removes ptvsd threads from the threads list.
This commit is contained in:
commit
0ea43968d6
1 changed files with 10 additions and 2 deletions
|
|
@ -455,6 +455,9 @@ class VSCodeMessageProcessor(ipcjson.SocketIO, ipcjson.IpcChannel):
|
|||
}
|
||||
self.send_event('process', **evt)
|
||||
|
||||
def is_debugger_internal_thread(self, thread_name):
|
||||
return thread_name and (thread_name.startswith('pydevd.') or thread_name.startswith('ptvsd.'))
|
||||
|
||||
@async_handler
|
||||
def on_threads(self, request, args):
|
||||
# TODO: docstring
|
||||
|
|
@ -473,7 +476,7 @@ class VSCodeMessageProcessor(ipcjson.SocketIO, ipcjson.IpcChannel):
|
|||
name = unquote(xthread['name'])
|
||||
except KeyError:
|
||||
name = None
|
||||
if not (name and name.startswith('pydevd.')):
|
||||
if not self.is_debugger_internal_thread(name):
|
||||
threads.append({'id': tid, 'name': name})
|
||||
|
||||
self.send_response(request, threads=threads)
|
||||
|
|
@ -724,7 +727,12 @@ class VSCodeMessageProcessor(ipcjson.SocketIO, ipcjson.IpcChannel):
|
|||
# TODO: docstring
|
||||
xml = untangle.parse(args).xml
|
||||
tid = self.thread_map.to_vscode(xml.thread['id'])
|
||||
self.send_event('thread', reason='started', threadId=tid)
|
||||
try:
|
||||
name = unquote(xml.thread['name'])
|
||||
except KeyError:
|
||||
name = None
|
||||
if not self.is_debugger_internal_thread(name):
|
||||
self.send_event('thread', reason='started', threadId=tid)
|
||||
|
||||
@pydevd_events.handler(pydevd_comm.CMD_THREAD_KILL)
|
||||
def on_pydevd_thread_kill(self, seq, args):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue