Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Commit

Permalink
Addressing comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
karthiknadig committed Feb 12, 2018
1 parent 21636ad commit 5675623
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ptvsd/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,9 @@ def send_process_event(self, start_method):
}
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
Expand All @@ -473,7 +476,7 @@ def on_threads(self, request, args):
name = unquote(xthread['name'])
except KeyError:
name = None
if not (name and (name.startswith('pydevd.') or name.startswith('ptvsd.'))):
if not self.is_debugger_internal_thread(name):
threads.append({'id': tid, 'name': name})

self.send_response(request, threads=threads)
Expand Down Expand Up @@ -728,7 +731,7 @@ def on_pydevd_thread_create(self, seq, args):
name = unquote(xml.thread['name'])
except KeyError:
name = None
if not (name and name.startswith('ptvsd.')):
if not self.is_debugger_internal_thread(name):
self.send_event('thread', reason='started', threadId=tid)

@pydevd_events.handler(pydevd_comm.CMD_THREAD_KILL)
Expand Down

0 comments on commit 5675623

Please sign in to comment.