Searching inside a JSON object in Google Chrome DevTools
Asked Answered
B

3

33

I love Google Chrome's DevTools. But, when debugging I sometimes need to search for a particular property or value in a JSON request/response object (within a request/response in the "Network" tab). This can be tedious if the JSON object is large. Do the DevTools support such a search?

In the example below, I was hoping that searching for "new_user" would highlight the property in the JSON object shown.


UPDATE: Since this question was asked, this functionality has been added to Chrome!

Beatification answered 7/7, 2015 at 10:2 Comment(2)
Then how to do it if it has been added? Please add the correct answer :)Ogrady
@Beatification so how u do this?Innsbruck
S
11

No existing functionality to search the json tree view. You can file a new issue in the issue tracker to see if it could get added.

Soulful answered 7/7, 2015 at 12:43 Comment(3)
Thanks, Jonathan. Have you received requests for such a feature before? Will it be worthwhile to file such a ticket or will it gather dust?Beatification
Thanks for asking if we received it before, just checked and sure enough we have one. So go star that issue to let the team know you want it done. Also comment with a link to your question so the team can see another use-case for the feature.Soulful
Thanks for the prompt attention. Will do and happy coding.Beatification
C
6

The feature seem to be now implemented:

  1. Click on the XHR request you want to see.
  2. Click on the "Preview" or "Response" tab and do CTRL + F
Chuvash answered 4/3, 2018 at 22:35 Comment(2)
I want to search across all XHR ResponsesRationalism
Ditto. I'm debugging a site that has hundreds of requests and I want to find the one I need by search for data inside the requestsLyonnesse
K
0

Workaround in Chrome (Really wish this was natively available):

  1. Filter by Fetch/XHR
  2. Select all
  3. Save all as HAR with content
  4. Open the file with your favorite text editor
  5. Search
Kush answered 30/3, 2023 at 16:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.