-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.pdbrc
8 lines (6 loc) · 1.05 KB
/
.pdbrc
1
2
3
4
5
6
7
8
# TODO I should simplify the loading structure here so it's an easy 'alias print_stack do_the_thing('print')
# alias print_stack !import inspect; current_frame = $_frame; exec('for i, frame in enumerate(reversed(inspect.getouterframes(current_frame))): print(f"{"=> " if frame.frame is current_frame else " "}#{i} {frame.frame.f_code.co_filename}:{frame.frame.f_lineno} in {frame.frame.f_code.co_name}")')
alias vscode import os, importlib.util; __vscode_spec = importlib.util.spec_from_file_location("vscode", os.path.expanduser("~/.config/pdbrc/vscode.py")); __vscode = importlib.util.module_from_spec(__vscode_spec); __vscode_spec.loader.exec_module(__vscode); __vscode.open_in_vscode_from_frame($_frame)
alias print_stack import importlib.util; __stacktrace_spec = importlib.util.spec_from_file_location("stacktrace", "/Users/mike/.config/pdbrc/stacktrace.py"); __stacktrace = importlib.util.module_from_spec(__stacktrace_spec); __stacktrace_spec.loader.exec_module(__stacktrace); __stacktrace.print_stack()
# !!import funcy_pipe as fp
# !import funcy_pipe as fp