Debugging javascript with GameJS and Firebug

19 views
Skip to first unread message

Rob S

unread,
Apr 24, 2013, 10:42:31 AM4/24/13
to gam...@googlegroups.com
I'm fairly early on in a project using GameJS. I've noticed that because all the javascript has to be loaded through yabble.js and the require() function, debugging and stepping through code in Firebug doesn't work because firebug can't access the generated source.

Obviously games programming can get quite complicated so it would be handy to step through code in Firebug. So my questions are:

1) Is there anyway to use FireBug or something similar with yabble.js ?

2) If not, is there a way to use gameJS without yabble so that everything is loaded in a more conventional way that makes debugging easier?

I've tried to only load gamejs through require() and loading my own code conventionally, but I get a 'Synchronous require() is not supported' message. It seems that any code that uses game js also has to load via require(), which means no debugging. It's entirely possible that I'm just missing something obvious, so if someone could point me in the right direction that would be great.

Thanks in advance for your help!
Rob

si...@nekapuzer.at

unread,
Apr 24, 2013, 10:57:12 AM4/24/13
to gam...@googlegroups.com
I am mostly using chrome to debug. Firebug should work too, but sometimes firebug doesn't get it right.

did you try setting the "break on error" in firebug, that sometimes helps him to correctly gather the stack.
> --
> You received this message because you are subscribed to the Google Groups "GameJs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to gamejs+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
Reply all
Reply to author
Forward
0 new messages