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 10, 2018
1 parent 21636ad commit fc17d59
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ptvsd/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,11 @@ def send_process_event(self, start_method):
}
self.send_event('process', **evt)

def is_debugger_internal_thread(self, thread_name):
if thread_name:
return thread_name.startswith('pydevd.') or thread_name.startswith('ptvsd.')
return False

@async_handler
def on_threads(self, request, args):
# TODO: docstring
Expand All @@ -473,7 +478,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 +733,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 fc17d59

Please sign in to comment.