-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add debug state to papyros editor #5366
Conversation
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.
One minor nitpick: there are some unused imports now in coding_scratchpad
.
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.
Nice work, this solves a few problems we had before 👍
-
I was a little confused by the editor state which was read-only (expected by me while debugging), but this was not shown visually. In fact, you can click the code and a caret even appears which hints that you can edit, but you can't.
-
edit: another minor remark: If generating traces is fast (which it often is), the buttons flicker quite a bit between the original, stop and stop debugging. Is there a reason to go to the run state first?
Two smaller remarks not really related to the PR:
- The gutter while debugging is quite big due to the large arrow tail and margin between arrow and line numbers. Maybe we can find a better arrow.
- When clicking on debug, the debugger opens but it is not super clear where you need to click to start the debugging process. We do explain this in the info box at step 0, but even I always have to think for a second. Maybe we can tweak the style of the next step (
>
) button (make it primary? make it primary only at step 0?)
In debug mode the lint gutter is now replaced by the debug gutter. This way the width doesn't increase. I also used an mdi icon instead of the font arrow so it should now look the same on all devices.
I am not exactly sure this is what you meant, but I changed it so the 'stop' button is shown while the state is 'loading' instead of the run/debug buttons. This mostly makes a difference the first time the debugger is opened (As it is in loading while papyros is fetched). For fast, but not instant programs there might still be a flickering stop button appearing, before the 'stop debugging' shows up. But this is harder to avoid as I can't predict execution will be that fast. |
@bmesuere I have added a 100ms delay on button changes which mostly solves the issue. Now it is still possible to have a flicker of exactly 100ms of the last open button state. (I added the delay on the general button change function, thus it also happens when changing to 'stop debugger') |
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.
👌
1 last nitpick, but I don't know if it's possible: the cursor is still the "text" cursor over the disabled input area
This pull request adds a debug state to the papyros editor.
related papyros pr: dodona-edu/papyros#629