Monday, May 20, 2024
15
rated 0 times [  16] [ 1]  / answers: 1 / hits: 64225  / 8 Years ago, tue, june 7, 2016, 12:00:00

I'm working on a new client's website that loads Javascript from a CDN so the Javascript is not embedded or inline with the webpage source. I would like to pause everytime getCurrentPosition() is executed in order to determine which external JS file it is contained in.



I realize I could use other tools to do a string search through the contents of the JS files but I would rather keep to Chrome's debugging tools.



Should I be trying to create a watch expression or is there another way to pin down when and where a certain JS function is fired?


More From » google-chrome

 Answers
2

You can search in all files using Chrome DevTools. Find your function and debug it:




  1. Open DevTools (F12)

  2. Go to sources tab

  3. Open Search All Files by pressing ctrl + shift + f (Win) or cmd + option + f (Mac)

  4. Search getCurrentPosition

  5. Put a breakpoint (By clicking the line number at the left of the line)



enter


[#61866] Monday, June 6, 2016, 8 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jadap

Total Points: 101
Total Questions: 104
Total Answers: 98

Location: Mexico
Member since Sun, Jul 25, 2021
3 Years ago
;