[breakpoints] refactor the breakpoint domain
I think there are some things missnamed inside the breakpoint domain which can lead to confusion. Personally I had a really hard time finding out what the source code really is doing.
Some examples:
ToggleBreakpoint : it doesn't toggle anything but adds / removes breakpoints
pendingBreakpoint could be named "persisted breakpoint" to be more concrete.
I also think that an action which adds a breakpoint if it not exists or adds/edits/removes the condition of a breakpoint is not really predictable and could cause lots of headache in the future.
How do you think about this @codehag @jasonLaster
/claim
Thanks for claiming the issue! :wave:
Here are some link for getting setup, contributing, and development tips. We're always happy to answer questions in slack! If you become busy, feel free to /unclaim it.
:fox_face: Debugger team!
I talked to @jasonLaster and I'll start with that because it's a great opportunity to get a better understanding of the code base
Hey, @nyrosmith still interested in this? It's a tough one because we're still trying to figure out what the right refactor is.
@jasonLaster true so let's close this until we figured out how we want to habe it
Re-opening with a proposal for toggling breakpoints. We currently have a couple toggle actions and they're not very clear. I think it would be nice to:
- move them into their own module
- add some docs and simpler names
- add jest tests around the code branches. (no bp, bp disabled, ...)
Here is a branch with my proposal! https://github.com/devtools-html/debugger.html/compare/master...jasonLaster:toggle?expand=1
here is another similar refactor for some other actions https://gist.github.com/jasonLaster/0a3d9231e03a38c9e983023f85b9e305
closing as this is not a priority. We can always send people here if they are looking for a refactor/code health project