Debugging auto.js
Permalink
Hi All,
SOmething I don't really know how to deal with is debugging the auto.js in blocks.
I am developing a block and I'm using Chrome and it's developer tools.
I can see and debug all the javascript I'm using except what's in auto.js.
How do I see it in Chrome developer tool? How come it doesn't show up?
Thanks for any light you might shed on this.
SOmething I don't really know how to deal with is debugging the auto.js in blocks.
I am developing a block and I'm using Chrome and it's developer tools.
I can see and debug all the javascript I'm using except what's in auto.js.
How do I see it in Chrome developer tool? How come it doesn't show up?
Thanks for any light you might shed on this.
Hi thanks for the answer.
I know auto.js applies to the add or edit form. I am in the process of creating an add-on that's why I need to be able to debug it.
Of course I use the debugger on the add/ edit form, I see everything else except the auto.js.
I put a few console.log() in my code to still get something to work on and it works, I see them in the console, but I can't use breakpoints or anything.
Any idea?
I know auto.js applies to the add or edit form. I am in the process of creating an add-on that's why I need to be able to debug it.
Of course I use the debugger on the add/ edit form, I see everything else except the auto.js.
I put a few console.log() in my code to still get something to work on and it works, I see them in the console, but I can't use breakpoints or anything.
Any idea?
Sometimes scripts that the Chrome debugger won't interact with can be debugged in Firefox, and vice-versa.
A trick I often use with console.log is
This enables me to keep plenty of logging throughout a complex script with a single flag to turn it off on released code and no risk of it breaking with browses that don't have a console.
A trick I often use with console.log is
var debug_flag=true; debug_flag && console && console.log(msg_or_object);
This enables me to keep plenty of logging throughout a complex script with a single flag to turn it off on released code and no risk of it breaking with browses that don't have a console.
Hi John
Nice trick thanks.
I'll try with firefox see if it makes a difference
Nice trick thanks.
I'll try with firefox see if it makes a difference
I just wrote it up in a bit more detail in a howto (awaiting approval, so this link is for future readers and not for now)
http://www.concrete5.org/documentation/how-tos/developers/some-tric...
http://www.concrete5.org/documentation/how-tos/developers/some-tric...
Are you trying to debug the view or the add/edit dialogs?