-
Notifications
You must be signed in to change notification settings - Fork 2
implemented debug() editor function which lets you navigate in the stack frame #192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
return excepthook | ||
|
||
|
||
def run_editor_on_exception(root_path=None, usercode_traceback=True): | ||
def run_editor_on_exception(root_path=None, usercode_traceback=True, usercode_frame=True): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget to repeat the new argument in the file viewer/__init__.pt
in the larray
repository
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do
sys.excepthook = orig_except_hook | ||
|
||
|
||
def debug(depth=0): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add this function to the larray
repository ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do
|
…ack frame run_editor_on_exception now uses debug so that we can navigate the traceback
Doesn't seem better. The "usercode" part of the names is fine IMO, but the "traceback" and "frame" parts are probably chinese to most of our users... even though this is not a big deal since they are not the target for such arguments. I expect we (or I?) will be the only one(s) using those arguments, but to me at least, they are very useful. I only want our typical users to understand the arguments enough to know they should probably not touch them 😉, and developers like you to understand them enough to actually use them. |
In that case, merge the PR as it. |
run_editor_on_exception now uses debug so that we can navigate the traceback
PS: I am not really happy with the names usercode_traceback (which already existed) and usercode_frame (new).
I just couldn't find anything better. Do you have a suggestion?