Skip to content

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

Closed
wants to merge 2 commits into from

Conversation

gdementen
Copy link
Collaborator

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?


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):
Copy link
Contributor

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

Copy link
Collaborator Author

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):
Copy link
Contributor

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 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do

@alixdamman
Copy link
Contributor

usersession instead of usercode?

@gdementen
Copy link
Collaborator Author

gdementen commented Sep 23, 2019

usersession instead of usercode?

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.

@alixdamman
Copy link
Contributor

In that case, merge the PR as it.

@gdementen gdementen added this to the 0.32 milestone Oct 10, 2019
@gdementen gdementen closed this Oct 10, 2019
@gdementen gdementen deleted the debugger branch October 10, 2019 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants