Online console to iterate with the code you are debugging

in web development / debugging, it would be very useful to have a console in which to modify the content of the variables that the project / subproject / function are using, in order to vary the behavior of the future code without having to simulate everything from the beginning every time it is necessary debug. In addition, the console would also be useful for testing code on the fly (a bit like it allowed to do visual basic). I understand it’s complicated but it would be very very useful.