the big problem is that, when the program is running, all the interactions with the web page are not running, except when the command 'wait' is run.
So, if the program is not stopped or in "wait" it will be impossible to stop it using the web interface.
Probably this design can be changed but, for the moment, this is how the program is done.
The web browser, unfortunately, is not a console and all the interactions pass through web requests; if the web server on the ESP is not running, all these requests are lost.
I don't know the reasons that pushed mmiscool into this choice, probably the negative performance required to answer web requests during program execution. For sure I think that there is a good reason.
One possible and simple solution could be to implement a "special" udp channel where we could send and receive debug commands (run, stop, pause, step, breakpoints, ...).
A customised utility could be in charge to send "commands" and, eventually, set and get variables.
But, maybe, this is rocket science ?