def debug_step(linum): """ Execute traces and watches on a program step. """ if not debug_mode: return outstr = '' if debug_tron: outstr += ('['+('%i' % linum) +']') for (expr, outs) in watch_list: outstr += (' ' + expr +' = ') outs.seek(2) try: val = expressions.parse_expression(outs) st = vartypes.unpack_string(representation.value_to_str_keep(val, screen=False)) if val[0] == '$': outstr += ('"'+st+'"') else: outstr += (st) except Exception as e: debug_handle_exc(e) if outstr: logging.debug(outstr)
def debug_step(linum): """ Execute traces and watches on a program step. """ if not debug_mode: return outstr = '' if debug_tron: outstr += ('[' + ('%i' % linum) + ']') for (expr, outs) in watch_list: outstr += (' ' + expr + ' = ') outs.seek(2) try: val = expressions.parse_expression(outs) st = vartypes.unpack_string( representation.value_to_str_keep(val, screen=False)) if val[0] == '$': outstr += ('"' + st + '"') else: outstr += (st) except Exception as e: debug_handle_exc(e) if outstr: logging.debug(outstr)
def value_str(ins): """ STR$: string representation of a number. """ s = vartypes.pass_number_keep(parse_bracket(ins)) return representation.value_to_str_keep(s, screen=True)