Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Facebook provide a way to load debug JS?

There are a number of references to using http://static.ak.fbcdn.net/connect/en_US/core.debug.js to facilitate javascript debugging (e.g. using Firebug) and I remember there was a recommendation in the developer docs some time ago about loading a debug version of the JS lib. The developer docs now only refer to the tool that allows you to submit some javascript on the form.

When I try to have my code load http://static.ak.fbcdn.net/connect/en_US/core.debug.js, the function I assigned to window.fbAsyncInit is not called. If I change to http://connect.facebook.net/en_US/all.js, the code runs, but it's exceedingly difficult to debug my custom XFBML tag code. The more frustrating thing is that my custom tag behaves perfectly when I load the connect-js code that's currently on GitHub.

How can I enable debugging (e.g. using Firebug) where the behavior depends on the Facebook Javascript SDK (all.js)? Is it easier using the Chrome Javascript debugger?

like image 898
John Avatar asked Sep 09 '11 16:09

John


1 Answers

You can reference the debug version using the URL

//connect.facebook.net/en_US/all/debug.js

like image 82
Paul Alexander Avatar answered Sep 21 '22 14:09

Paul Alexander