Would be really cool if this worked in straight .js files too, for
people who 'compile' to javascript, the way #file and #line directives
work for C as an assembly language.
Steven Roussey wrote: > Ah, that's awesome! I'll have to actually use it now that I know how > to...
For what release does this work? I have several files that I "import" dynamically via XHR and eval(). I put the comment at the end of one of them, but the name didn't "take" in the Script tab "files" menu (using FB 1.4.2 on FF 3.0.13). Or am I completely misunderstanding this feature?
On Aug 13, 9:25 am, Don Dwiggins <ddwigg...@advpubtech.com> wrote:
> Steven Roussey wrote:
> > Ah, that's awesome! I'll have to actually use it now that I know how
> > to...
> For what release does this work? I have several files that I "import"
This has been in since maybe Firebug 1.2.
> dynamically via XHR and eval(). I put the comment at the end of one of
> them, but the name didn't "take" in the Script tab "files" menu (using
> FB 1.4.2 on FF 3.0.13). Or am I completely misunderstanding this feature?
johnjbarton wrote: >> dynamically via XHR and eval(). I put the comment at the end of one of >> them, but the name didn't "take" in the Script tab "files" menu (using >> FB 1.4.2 on FF 3.0.13). Or am I completely misunderstanding this feature?
And it works for me. A few difference I note from what I tried:
- The URL in the example is res:/FireclipseTests/WebContent/payloadCatsAndDucks.js; I just used a filename (which seems to match the regexp in the blog entry.)
- In the example, the sourceURL line occurs both at the top (2nd line) and bottom of the file. I have it only at the bottom.
- My file has the extension .tpl (a Zend Framework template file) rather than .js.
- I don't know if it's related, but in loading my file, only the first line shows in the Script tab, although all lines show in the Response tab of the request in Console and Net. I'd seen that occasionally in FB 1.3, but not in the few days after I upgraded to 1.4.2 -- until now.
- My file is loaded after a sequence of page loads and interactions.
> johnjbarton wrote:
> >> dynamically via XHR and eval(). I put the comment at the end of one of
> >> them, but the name didn't "take" in the Script tab "files" menu (using
> >> FB 1.4.2 on FF 3.0.13). Or am I completely misunderstanding this feature?
> And it works for me. A few difference I note from what I tried:
> - The URL in the example is
> res:/FireclipseTests/WebContent/payloadCatsAndDucks.js; I just used a
> filename (which seems to match the regexp in the blog entry.)
> - In the example, the sourceURL line occurs both at the top (2nd line)
> and bottom of the file. I have it only at the bottom.
> - My file has the extension .tpl (a Zend Framework template file) rather
> than .js.
> - I don't know if it's related, but in loading my file, only the first
> line shows in the Script tab, although all lines show in the Response
> tab of the request in Console and Net. I'd seen that occasionally in FB
> 1.3, but not in the few days after I upgraded to 1.4.2 -- until now.
> - My file is loaded after a sequence of page loads and interactions.
> --
> Don Dwiggins
> Advanced Publishing Technology