farre / midas

A GDB/MI Visual Studio Code Debug Adapter
MIT License
29 stars 1 forks source link

[Feature Request] Run from a given event #187

Closed sj-raima closed 8 months ago

sj-raima commented 8 months ago

Background: Checkpoints can be set, and we can run from those. However, if we have en event we want to run from, we can with rr replay use run EVENT. With Midas there is no such option. Using the run command in Midas from the Debug Console disconnects the debugger.

Implement the run command in the Debug Console and a button and/or input field in the debug bar next to the Set Checkpoint button.

theIDinside commented 8 months ago

Great idea. I will implement it ASAP. I'll also implement the run command from the debug console, as it basically boils down to the same thing we do for restarting at checkpoints; disconnect our event listeners in the DAP server to "termination events" and reconnect them once we've "hit a breakpoint || stopped event", thus circumventing the forced disconnect.

Got any ideas for a button icon? I was thinking of perhaps some arrow pointing at a dot like so: -> o (think of the o as a dot). I'd have to draw the SVG myself though which is.. ugh. I guess text run to event could also work, but it would eat up considerably more real estate on the debug toolbar.

sj-raima commented 8 months ago

Usingrr replay it seems to start at the end of the event (beginning of the one following it) and not at the beginning. Maybe the icon should be" o->?

sj-raima commented 8 months ago

Or it could just be a dot as the run command break at the end of the event.

sj-raima commented 8 months ago

Excellent work. One minor point. The text for the input box could be improved:

Enter the event number or Escape to Cancel

Instead of:

Press Enter to confirm your input or press Escape to Cancel
theIDinside commented 8 months ago

I'm not thrilled over the button I chose, but it will do for now. Marking this as closed.