Martin Dimitrov
Martin Dimitrov

Reputation: 4966

In Firefox how to find out the code line that makes a request?

Is there an extension or Firebug feature that will tells me the exact line and file from which a HTTP request is made?

In Firebug, the Net tab shows the HTTP headers but not the line that triggered the request. The Console tab will report request with error codes and their expected URL but again without the line where the request is made from the CSS, JavaScript or HTML file.

example of Firebug Console tab

Thanks in advance.

EDIT: A possible use case is to be able to quickly see in the browser image requests that return 404 - in which file (there might be several CSS files) the request was initiated and the line.

Upvotes: 9

Views: 3505

Answers (1)

Robert Koritnik
Robert Koritnik

Reputation: 105081

No Firebug feature (most likely no extension either)

Firebug doesn't display that and what's even more is that most production-level web applications use minified scripts so this info wouldn't be valuable anyway...

If you're developing an app, you don't use minified scripts but then you know which call initiated a request. But if you're looking at other running apps than minification will make it impossible to determine calling code.

Search in files

Many text editors nowadays support search/find in files feature which makes it possible to search several files at once so you don't have to do it manually yourself. Simple editors like Notepad++ support this as well as several IDEs (like Visual Studio). This makes it simple for you to find culprits that requested those missing files1.

1: But I agree... Such feature would be great if supported directly in Firebug.

Upvotes: 6

Related Questions