S
S
Sergey Volkov2012-03-03 11:02:14
JavaScript
Sergey Volkov, 2012-03-03 11:02:14

Debugging preloaded javascript?

Hello.
I use reloading on the client implemented in this way

loadJS: function (url) {<br/>
 $.ajax({<br/>
 async: false,<br/>
 cache: true,<br/>
 url: url,<br/>
 dataType: &quot;script&quot;<br/>
 });<br/>
}

But the problem is that debuggers (firebug, as well as Chrome and Opera) do not allow debugging such scripts, they simply do not show them. That is, if the script was loaded along with the page, then I can view it, make breakpoints, etc. But I can’t do this with additionally loaded scripts.
Is there another way to load scripts?
Maybe you need to set up a debugger?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
K
Konstantin Kitmanov, 2012-03-03
@k12th

I would use the debugger expression .

A
Anatoly, 2012-03-03
@taliban

for development, you can load it in advance, and when you check everything, load it dynamically.

G
gro, 2012-03-03
@gro

Create a SCRIPT element with the desired SRC and insert it into the page.

S
Sergey Volkov, 2012-03-03
@format1981

Found in firebug (in the upper left corner) a drop-down menu.
One of the points is this: show static, eval and event scripts.
The script loaded in my way became available for viewing, but it is shown in one line and is not suitable for debugging.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question