示例#1
0
    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)
示例#2
0
文件: __init__.py 项目: Kozea/wdb
    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)