Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

chrome debug missing script

I'm doing some debugging on my site that has multiple scripts running. When I debug in firefox using firebug, the specific script I'm working on, (basically a series of jQuery listeners), shows up, breakpoints work - awesome. When I debug in chrome though, the script shows up under resources, but not under scripts. I can't put in breakpoints! I'm not a big fan of firebug, and I would really prefer to use chrome's debugger.

I'm not 100% where the problem is. It could be chrome (that's where I'm leaning), but I am debugging the script, so it's nowhere near stable enough to rule out. (The functions in the listeners aren't breaking in firebug)

Q: How does chrome decide to put something in the scripts tab and thereby allow debugging? and does it ever get this wrong and exclude scripts that run?

like image 556
Tin Can Avatar asked Dec 07 '25 06:12

Tin Can


2 Answers

DevTools may omit scripts that are fully collected at some moment of time. For example if you script does not have any function, it will be fully collected once it ran. Could it be your case?

like image 118
beefeather Avatar answered Dec 08 '25 18:12

beefeather


From what I understand, imported scripts are put in a separate script pane whereas scripts embedded in the webpage are displayed in the webpage pane (yourpage.html). You can still access the webpage pane for debugging most of the time. I haven't ever had anything like the problem you're describing though, so I may not understand your issue.

like image 25
twmb Avatar answered Dec 08 '25 19:12

twmb



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!