简体   繁体   中英

How to use firebug to debug a custom javascript jquery file without stopping on all the others jquery core files?

I would like to start a line by line debug session in Firebug but only for the lines that belongs to the selected file in the scripts panel.

I would like to avoid entering inside the core files of any javascript library such as Jquery and end up looking at an amount huge of code that it is supposed to work ok.

Is there a way that I can configure the debugger to be smart enough to just stop only on the lines that belongs to my custom js file without setting a breakpoint in each line of the whole file?

EDIT May-12: In order to clarify better what I need, I'm just asking if is there any way I could debug on a per file basis and not on a per line basis as we all are use to do. Say that I have a javascript process that I don't own (I don't write it) and I just want to inspect how it works. I don't know precisely how the process flows but said that I'm interested in debug only one file. The main problem is cause I don't own the project I don't know the flow, so I don't know in which point of my javascript file will be the pointer of execution. So I'm asking if there is any way to set a breakpoint only when the execution line is my file, without starting from the first line of execution and step in, and step out into it.

Best, Demian

When stuff goes wrong, you need to know that it will not always stop in your code. Using the stack trace you can see which function call of yours caused node to crash, it shows a list of which how the functions called each other. You can find the stack tab at the right hand side:

在此处输入图片说明

If you press F10 after your breakpoint debugger will step over next function call (line) in your js file and so on. F11 will go inside function call. So combining this two shourtkeys you can easily debug what you want.

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