Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I set breakpoints in an external JS script in Firebug

I can easily set breakpoints in embedded JS functions, but I don't see any way of accessing external JS scripts via Firebug unless I happen to enter them during a debug session. Is there a way to do this without having to 'explore' my way into the script?

@Jason: This is a good point, but in my case I do not have easy access to the script. I am specifically talking about the client scripts which are invoked by the ASP.Net Validators that I would like to debug. I can access them during a debug session through entering the function calls, but I could not find a way to access them directly.

like image 506
Manu Avatar asked Aug 28 '08 15:08

Manu


People also ask

Can you use breakpoints in JavaScript?

In the debugger window, you can set breakpoints in the JavaScript code. At each breakpoint, JavaScript will stop executing, and let you examine JavaScript values. After examining values, you can resume the execution of code (typically with a play button).

How do you hit a breakpoint in JavaScript?

To enable the new multi-target debugger in VS 16.7 or newer please go to Tools -> Options -> Debugging -> General -> and check the option: “Enable using the multi-target JavaScript debugger for debugging JavaScript in ASP.NET projects (requires debugging restart)”


1 Answers

Place debugger; in your external script file on the line you want to break on.

like image 166
Jason Bunting Avatar answered Oct 12 '22 04:10

Jason Bunting