Skip to content

Commit 4f9ca6f

Browse files
committed
Filtered out irrelevant variables
1 parent 55c34e4 commit 4f9ca6f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ipykernel/debugger.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,10 @@ def _handle_event(self, msg):
232232
if msg['event'] == 'stopped':
233233
self.stopped_threads.append(msg['body']['threadId'])
234234
elif msg['event'] == 'continued':
235-
self.stopped_threads.remove(msg['body']['threadId'])
235+
try:
236+
self.stopped_threads.remove(msg['body']['threadId'])
237+
except:
238+
pass
236239
self.event_callback(msg)
237240

238241
async def _forward_message(self, msg):
@@ -324,7 +327,9 @@ async def stackTrace(self, message):
324327
return reply
325328

326329
def accept_variable(self, variable):
327-
return variable['type'] != 'list' and variable['type'] != 'ZMQExitAutocall' and variable['type'] != 'dict'
330+
cond = variable['type'] != 'list' and variable['type'] != 'ZMQExitAutocall' and variable['type'] != 'dict'
331+
cond = cond and variable['name'] not in ['debugpy', '_i', '_ii', '_iii', '_i1', '_i2', '_i3', '_']
332+
return cond
328333

329334
async def variables(self, message):
330335
reply = await self._forward_message(message)

0 commit comments

Comments
 (0)