-
Notifications
You must be signed in to change notification settings - Fork 447
When code.py crashes - debug window contents disappear #2566
Description
What were you trying to do?
Edit code
What steps did you take to trigger the issue?
Found that these line of code will work,
import board
import rotaryio
tuning = rotaryio.IncrementalEncoder(board.GP1, board.GP2, divisor=4)
But these line cause everything to crash,
import board
import rotaryio
tuning = rotaryio.IncrementalEncoder(board.GP1, board.GP11, divisor=4)
(root cause is that the encoder pins have to be sequential which is not documented anywhere - I have opened an issue with CircuitPython)
As for Mu behavior: First there are some debug messages which are quickly gone as the serial window closes - it seems this error hard resets the PICO and USB serial is lost. Then the device / editor is in safe mode that can only be exited by fixing the code.py file on the Pico, exiting the editor, unplugging the pico, then replugging the Pico, then restarting the editor.
It took a long time to finally see the error message 'flash by' before disappearing for me to see the issue. Making debugging near impossible.
If possible, it would be really helpful to log the last load messages from the serial window somewhere (I could not find them, if they are kept).
-OR- Other syntax errors seem to just stop the running program and I can fix them, for some reason this particular error crashes the whole shebang. Perhaps the error level/severity can be lowered so the editor does not crash.
Thanks for your time and effort on the editor.
What did you expect to happen?
No response
What actually happened?
No response
Operating System Version
No response
Mu Version
No response
Other Info
No response
Editor Log
No response