简体   繁体   中英

Get a source file and line of any function using Firebug

Some guy points out that Firebug does display the source file and line for event handlers . I have a pseudo-class defined somewhere within 11 script files. Could I use Firebug to find out which file did I put it into? *

It's embarrassing when you write a code and you just can't find it while executing it...

* Pseudo-class is just a function that keeps it's namespace after execution. If I put it very simply...

To find the code you can simply use the search field at the top right of Firebug when you are at the Script panel.

Firebug中的搜索字段

Ensure you have checked the option Multiple Files within the search options, then type the name of your "pseudo-class". You can hit Enter multiple times to switch through the matches.

When you found the code, the name of the file is displayed within the panel toolbar. Hover it to get the full URL of the file as tooltip.

脚本位置按钮

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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