Skip to content
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

use of reset() increases robustness but obscures debugging #161

Open
sgbaird opened this issue Jan 5, 2023 · 1 comment
Open

use of reset() increases robustness but obscures debugging #161

sgbaird opened this issue Jan 5, 2023 · 1 comment

Comments

@sgbaird
Copy link
Member

sgbaird commented Jan 5, 2023

Mainly because it renders the following after any error in the try block is raised:

PROBLEM IN THONNY'S BACK-END: Exception while handling 'Run' (ConnectionError: EOF).
You may need to press "Stop/Restart" or hard-reset your MicroPython device and try again.

See Thonny's backend.log for more info.

Process ended with exit code 1.

Commenting reset() while debugging is one option:

There could also be a debug flag that gets set at the beginning, where if it's True, then it doesn't run the reset line. Similarly, there could be a num_hard_reset_tries variable or similar.

@sgbaird
Copy link
Member Author

sgbaird commented Jan 7, 2023

Maybe doing a soft reset via sys.exit() before doing reset() would make sense here.

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

No branches or pull requests

1 participant