简体   繁体   English

我如何找出调用的函数在哪个引用的js脚本中

[英]How can I find out in which referred js-script the called function is

when I call a js-function I want to know in which referred script the called function is located. 当我调用js函数时,我想知道被调用函数位于哪个引用脚本中。

example: 例:

index.html contains scriptpath1 scriptpath2 script....n index.html包含scriptpath1 scriptpath2脚本.... n

.... fooFunction .... fooFunction

So how can I found out in a fast way where the foo() is located without exploring the whole dirs? 因此,如何在不探索整个目录的情况下快速找到foo()所在的位置?

  1. I would open up dev tools 我会打开开发工具
  2. In Chrome navigate to the sources tab. 在Chrome中,导航到“来源”标签。
  3. From here right click on the server/page name and select Search in all files 从这里右键单击服务器/页面名称,然后选择在所有文件中搜索
  4. Enter the search term in the console box at the bottom of the window 在窗口底部的控制台框中输入搜索词
  5. ... ...
  6. Profit? 利润?

利用浏览器开发工具并弄清楚

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM