- Breakpoints in Firebug script debugger
- Find state of variables by assigning them to global vars temporarily, e.g.:
var debugState; // Delete me once you've finished debugging
function someFunction() { var state = 'interesting value I want to inspect'; .... do some work on 'state' debugState = state; }
Then access debugState in the Firebug console. The console allows you to use JavaScript to interact with your page.
- Using console.log(msg, ...) in your scripts. You can pass multiple variables and these will all get output to the console, e.g.:
console.log('The Carousel:', carousel, 'Foo:', bar, ...)
- Breakpoints in Firebug script debugger
- Find state of variables by assigning them to global vars temporarily, e.g.:
var debugState; // Delete me once you've finished debugging
function someFunction() { var state = 'interesting value I want to inspect'; .... do some work on 'state' debugState = state; }
Then access debugState in the Firebug console. The console allows you to use JavaScript to interact with your page.
- Using console.log(msg, ...) in your scripts. You can pass multiple variables and these will all get output to the console, e.g.:
console.log('The Carousel:', carousel, 'Foo:', bar, ...)