Bind keyboard button to jump to/from /#debug
view
#70
Labels
documentation
Improvements or additions to documentation
/#debug
view
#70
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, usingplatform.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 aexit_debug()
too? Also, do I just throwwindow.debug = debug
after the function declaration in my template or is there some other way to access it from python?The text was updated successfully, but these errors were encountered: