2576
Developer's Corner / Re: Firebug: Saved / Persisted Watch Expressions, Breakpoints, etc.?
« Last post by ewemoa on January 03, 2009, 08:22 AM »Thanks for the response.
I'm not sure I follow your suggestion. Is there some way to set up watch expressions from the console? If I knew this, I think I would understand your suggestion, but I have not figured out how to do that. I looked at the following, but didn't managed to figure out anything relevant:
For global functions, IIUC, I can use debug(fn) to set up a breakpoint for a function, but there are two issues with this as I see it. The first is that the breakpoint is set up on the first line of the function only (I suppose this is better than nothing). The second issue is that there is only one global function in fulljslint.js -- all other functions are local in scope to that one function -- and so placing debug(fn) in a separate script doesn't seem like it will be that useful because none of the functions I want to examine (save the main JSLINT one) are visible (I tried debug(advance); in the FB console w/o a successful result).
I tried placing debug(fn) inside fulljslint.js but this gave an error: debug is not defined. This seemed slightly odd as earlier I had success with placing console.log calls to fulljslint.js.
I guess I could try modifying fulljslint.js so that it made the functions I wanted to examine available globally...
Edit: I tried the modification I had in mind, but although I was able to successfully call debug(fn); from the console, execution doesn't appear to stop when the code runs -- perhaps the breakpoint is not being set or honored. It'd be nice if I was just doing something wrong
I'm not sure I follow your suggestion. Is there some way to set up watch expressions from the console? If I knew this, I think I would understand your suggestion, but I have not figured out how to do that. I looked at the following, but didn't managed to figure out anything relevant:
For global functions, IIUC, I can use debug(fn) to set up a breakpoint for a function, but there are two issues with this as I see it. The first is that the breakpoint is set up on the first line of the function only (I suppose this is better than nothing). The second issue is that there is only one global function in fulljslint.js -- all other functions are local in scope to that one function -- and so placing debug(fn) in a separate script doesn't seem like it will be that useful because none of the functions I want to examine (save the main JSLINT one) are visible (I tried debug(advance); in the FB console w/o a successful result).
I tried placing debug(fn) inside fulljslint.js but this gave an error: debug is not defined. This seemed slightly odd as earlier I had success with placing console.log calls to fulljslint.js.
I guess I could try modifying fulljslint.js so that it made the functions I wanted to examine available globally...
Edit: I tried the modification I had in mind, but although I was able to successfully call debug(fn); from the console, execution doesn't appear to stop when the code runs -- perhaps the breakpoint is not being set or honored. It'd be nice if I was just doing something wrong


Recent Posts

