Determine file and line of code from Chrome DevTools?

Not a coder here, but know my way around enough to get done what I need to do. Problem is I’m having trouble finding code to alter. Isn’t there a way using Chrome DevTools to isolate a php file that is generating specific output?

Not directly that I know of. Chrome is a browser and works with HTML, CSS JavaScript, images etc, not PHP files.

That said, I often use it to help track down problems eg. take note of an Id or class value then grep it a text editor or Ide to find the file that’s responsible for the problem output.

Unfortunately ,it cannot identify the PHP file, because the devtools look at the generated code, which PHP brings together on the server level and feeds to the browser. The devtools don’t even know you have PHP include files :slight_smile: .

Darn it, ok… I think I may have found what I was looking for, but it took a while…
Another round about way would be a tool, I’m sure it exists, that can search php files on a server for a particular string

And so it does. eg. Notepad++ and IntellJ IDEA both have “search” capabilities. And not only for simple text strings, but regex and filter by file type as well.

I know about Notepad++ but isn’t that only for local hard drive files? I need to search files on a web server. I’ll check the other tools you mentioned

Yes. sorry. I meant searching on a localhost server, not on a live site. But don’t you have a dev copy of the site on your machine?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.