Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Add proper states for debugging command buttons #116

Merged
merged 1 commit into from
Apr 29, 2016

Conversation

gregtatum
Copy link
Member

This resolves issue #96.

I believe there is an existing error with waiting for the next break point that involves loading in source code. However despite that error I believe this will correctly handle the possible button states.

There is a slight flicker on the play/pause button when stepping over code. This is due to the way that the inline svg module loads in the SVG. I also took the liberty to refactor some of the CSS to make the button hit areas more consistent.

What's the current state of testing? I noticed there wasn't too much in there, so I didn't include any with this pull request.

@gregtatum
Copy link
Member Author

Hmm... forgot to re-run the tests when I rebased. I've got an error here.

@gregtatum
Copy link
Member Author

Actually that error is on master. I think it might be related to the error I mentioned above.

@jlongster
Copy link
Contributor

Yep the tests are currently broken. We will fix it today.

@jlongster
Copy link
Contributor

This LGTM. I think at some point we'll want to re-think our state shape, but no need to worry about it right now. Let's figure out all the various needs first.

@gregtatum
Copy link
Member Author

Cool, I think have some kind of finite state machine would be more useful that flags. The memory tool has something similar.

I drew this out, but I realized that there is no way to detect the "getting next" state as far as I can tell. Observing the existing FF and Chrome debugger it looks like they don't detect the "getting next" state either.

debugger-buttons-fsm

@gregtatum gregtatum merged commit 0ef163a into master Apr 29, 2016
@gregtatum gregtatum deleted the debug-button-state branch April 29, 2016 16:03
@jasonLaster
Copy link
Contributor

Thanks @TatumCreative. Looks good!

@jlongster
Copy link
Contributor

@TatumCreative yeah, stepping is just "resuming" and then getting a paused packet at some later time. As we switch between paused/resumed states we update the UI. You can step from the last line of code and never get a pause packet because the code finished running, which is a valid thing to happen.

Having some kind of state flag is probably helpful though. There are various things that would be good to know about, like "paused at breakpoint", "paused on exception", etc. We'll think about this more.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants