Description
My understanding of the #debug
feature and generally of the html and javascript parts of the project is really shaky.
How would I add a keyboard binding (for example F12) to go to and from the /#debug
page in the game?
Without reloading the page or code, of course, otherwise I could do platform.window.location = X; platform.window.location.reload()
.
Is there some javascript methods I can hook into the window
global on the javascript side, to enter/exit #debug
REPL mode? I could then call them from python, on the F12 pygame event, using platform.window.the_hook_here
.
Thanks for the great work!
PS
I stumbled upon https://pygame-web.github.io/wiki/pygbag-debug/ and the debug()
function in js - is there a exit_debug()
too? Also, do I just throw window.debug = debug
after the function declaration in my template or is there some other way to access it from python?