I'm adding scripts on demand using jQuery.append('<script
src="something.js"></script>'). Is there some way to get these to show
up in the scripts list in dev tools so I can set a breakpoint and
debug the code? Right now I have to add a "debugger" statement to load
the script source into dev tools debugger.
On Thu, Mar 15, 2012 at 9:36 PM, Patrick Stinson <patr...@res3d.com> wrote: > I'm adding scripts on demand using jQuery.append('<script > src="something.js"></script>'). Is there some way to get these to show > up in the scripts list in dev tools so I can set a breakpoint and > debug the code? Right now I have to add a "debugger" statement to load > the script source into dev tools debugger.
> Could you please describe scenario that reproduces your problem in more details (preferably providing some test url).
> Thank you, > Vsevolod
> On Thu, Mar 15, 2012 at 9:36 PM, Patrick Stinson <patr...@res3d.com> wrote: > I'm adding scripts on demand using jQuery.append('<script > src="something.js"></script>'). Is there some way to get these to show > up in the scripts list in dev tools so I can set a breakpoint and > debug the code? Right now I have to add a "debugger" statement to load > the script source into dev tools debugger.
>> Could you please describe scenario that reproduces your problem in more details (preferably providing some test url).
>> Thank you, >> Vsevolod
>> On Thu, Mar 15, 2012 at 9:36 PM, Patrick Stinson <patr...@res3d.com> wrote: >> I'm adding scripts on demand using jQuery.append('<script >> src="something.js"></script>'). Is there some way to get these to show >> up in the scripts list in dev tools so I can set a breakpoint and >> debug the code? Right now I have to add a "debugger" statement to load >> the script source into dev tools debugger.
> Could you please describe scenario that reproduces your problem in more > details (preferably providing some test url).
> Thank you, > Vsevolod
> On Thu, Mar 15, 2012 at 9:36 PM, Patrick Stinson <patr...@res3d.com>wrote:
>> I'm adding scripts on demand using jQuery.append('<script >> src="something.js"></script>'). Is there some way to get these to show >> up in the scripts list in dev tools so I can set a breakpoint and >> debug the code? Right now I have to add a "debugger" statement to load >> the script source into dev tools debugger.
>> Could you please describe scenario that reproduces your problem in more >> details (preferably providing some test url).
>> Thank you, >> Vsevolod
>> On Thu, Mar 15, 2012 at 9:36 PM, Patrick Stinson <patr...@res3d.com>wrote:
>>> I'm adding scripts on demand using jQuery.append('<script >>> src="something.js"></script>'). Is there some way to get these to show >>> up in the scripts list in dev tools so I can set a breakpoint and >>> debug the code? Right now I have to add a "debugger" statement to load >>> the script source into dev tools debugger.
>> Could you please describe scenario that reproduces your problem in more details (preferably providing some test url).
>> Thank you, >> Vsevolod
>> On Thu, Mar 15, 2012 at 9:36 PM, Patrick Stinson <patr...@res3d.com> wrote: >> I'm adding scripts on demand using jQuery.append('<script >> src="something.js"></script>'). Is there some way to get these to show >> up in the scripts list in dev tools so I can set a breakpoint and >> debug the code? Right now I have to add a "debugger" statement to load >> the script source into dev tools debugger.
On Tue, Aug 28, 2012 at 5:20 PM, <orntha...@gmail.com> wrote:
> That didn't work for me.
> My script still doesn't show up in the dev tools... and was loaded the
> same way (with jquery .append()) :/
My script doesn't show up in the Chrome dev tools.
Obviously, the way jquery loads it is not suitable for now to be debugged
inside the dev tools.
The workaround proposed in Firebug for Firefox doesn't work either for me.
There's an improvement compared to Chrome: I can see my script in Firebug,
but only evaluated, inlined and though, not usable for debugging...
I hope that one day the Chrome dev tools will be updated to fix that
issue...
If you add sourceURL to your script before appending it by jquery it should
appear in Chrome Develper Tools and you should be able to debug it.
If you experience any problems with this approach I would like to know more
details, like the code snippet you are using or the example url where it
doesn't work for you.
On Tue, Aug 28, 2012 at 6:31 PM, Ornthalas <orntha...@gmail.com> wrote:
> Ok, sorry, that was ambiguous.
> My script doesn't show up in the Chrome dev tools.
> Obviously, the way jquery loads it is not suitable for now to be debugged
> inside the dev tools.
> The workaround proposed in Firebug for Firefox doesn't work either for me.
> There's an improvement compared to Chrome: I can see my script in Firebug,
> but only evaluated, inlined and though, not usable for debugging...
> I hope that one day the Chrome dev tools will be updated to fix that
> issue...
On Tue, Aug 28, 2012 at 8:00 PM, Ornthalas <orntha...@gmail.com> wrote:
> OK, now I get it:
> This feature seems to work only on the dev branch of Chrome.
> After updating, it works fine :)