def write(self, message): log.debug('socket -> websocket: %s' % message) message = message.decode('utf-8') if (message.startswith('BreakSet|') or message.startswith('BreakUnset|')): log.debug('Intercepted break') cmd, brk = message.split('|', 1) brk = json.loads(brk) if not brk['temporary']: del brk['temporary'] if cmd == 'BreakSet': breakpoints.add(brk) elif cmd == 'BreakUnset': breakpoints.remove(brk) self.write_message(message)