Who can I replay a request in chrome 99? - google-chrome-devtools

recently Chrome removed the "Replay XHR" option in dev tools and in chrome 98 they say to "Replay XHR with keyboard shortcut r." This doesn't work for me in Chrome 99. Is this a bug?
Are there any alternatives other than using copy as fetch or similar as those take too much time?
Thank you
EDIT: Actually you can only replay successful requests which is weird. I also need to do that for failed requests.

Related

Bizarre behavior about network tab of remote debugging

I use remote debugging of devtool to debug a webpage in Android.
I have learnt that devtool first downloaded some file(filename screen capture) necessary to debug page of webview.
However, when i clicked the filter of Network tab, something strange happened.
For example, i click XHR filter with the expection of filtering only xhr request, but only to toggle other filters than XHR tab, like All, JS, CSS, Img...gif of bizarre behavior
I used remote debugging before, but didn't encounter this strange behavior.
Is this the problem about version? I can't control the version of file which is downloaded by devtool.
Is this an official problem? Please help me, thank in advance!

My dev tools are missing the "replay xhr" option

I'm currently using verison 72.0.3626.119 on a Debian Strecht. I've noticed that since a couple of days (perhaps one or two weeks)
I'm missing the Replay XHR menu entry you get when you do a right click on an XHR request in the network
window as described here.
I've been also searching google for this with mixed results, I've found this SO question from 2016 where
the OP seems to have a similar issue but since my xhr request are not uploading files, this does not apply to me either.
In the devtool forums I've found nothing that could help.
So the question is, is this function also gone for everybody else? Or is it just me? I've gone through the devtools
settings but I didn't find any option that would help me with this.
The replay XHR still there if you are using the xhr api via axios or something similar, however, if your app is using the new api fetch, you need to use a different approach.
Since Chrome 67, it was introduced a new feature called copy as fetch.
In that case, you can copy as fetch and paste on your console.
So, if you'd like to replay your fetch requests, just paste on your console, then press ↑ and enter to replay your XHR.
The best part of that on the new feature is that you are able to edit your request, before replay.

Chrome Request Blocking (Experimental Feature) - how to unblock?

I am using an experimental feature in Chrome called "Request Blocking" to simulate the behavior of an ad blocker which is blocking our New Relic script.
After the feature is enabled:
and after refreshing:
but when I access the menu again, the only Request Blocking option is:
Obviously this feature is experimental and may be incomplete (maybe it's just not coded yet!). Has anyone uncovered a way to un-block resources when using the Request Blocking experimental feature?
I uncovered the feature from this SO post.
Solution: resetting the browser as the accepted answer suggests worked, but I was able to keep my settings and only "undo" the experiment's changes by disabling the experiment and restarting Chrome.
When in doubt, try resetting Chrome before using an experiment.
I was seeing similar problems when I first enabled the experiment, but after resetting Chrome, there's now a blue icon next to the Offline checkbox, and a Request Blocking tab in the Drawer. Clicking the blue icon opens the tab.

How to filter chrome's devtool console history

In bash, I use the history-search-forward and history-search-backward feature to allow me to type in a few characters of the command I want to run, then press up arrow to cycle through items in my history that match those characters.
I want the same thing for the chrome devtool console. I often use up arrow to cycle through my history, but there doesn't seem to be a way to filter it. Does anybody have a clever solution?
[Just a note that command history matching has improved a lot in recent versions of Chrome. It's not exactly how I would like it, but it's pretty good.]
Reverse search feature is not there in Chrome developer tools. I have logged a request for the reverse search feature. Please star the same.
http://code.google.com/p/chromium/issues/detail?id=171386
I use Snippets (Chrome Developer Tools: What is Snippets Support?) for keeping track of all my commands.
Try this: (based on How to remove all recent console command)
Open Chrome Dev Tools on the Chrome Dev Tools window (as per post above) by following steps 1-3 on the first answer (by Rob W). Don't do step 4 or you'll wipe out your history!
Run this command in the new Dev Tools console: JSON.parse(localStorage.getItem('consoleHistory')).filter(function(item){ return ~item.indexOf('indexedDB');})
Replace "indexedDB" with whatever it is you want to filter on.
TL;DR
Chrome Dev Tools is technically just another browser window.
The LocalStorage of the original Dev Tools is for the site you are browsing.
By opening Dev Tools on the Dev Tools, gives you the LocalStorage for the Dev Tools window and thus gives you access to the consoleHistory.
localStorage.getItem('consoleHistory') gives you a string of an Array, so you need to parse it (i.e. JSON.parse()) back into an Array so you can filter it.
The ~ in front of ~item.indexOf('indexedDB') is a bitwise shortcut for item.indexOf('indexedDB') > 0
Adding my 2 cents since the most upvoted answer has stopped working.
Chrome does not have a bash-like search yet (Ctrl + R) but recent versions of Chrome have history autocomplete. Start typing a command and it will show suggestions from the history (just below the usual syntax suggestions). This is not exactly "search", but good enough for "starts with" type of filtering.
Works in all Chromium browsers including MS Edge
When you open the console of the devTools and clicking on the up-arrow (or the down-arrow) you will start cycle through your 'history' of commands.

Fiddler not working in any version of Internet explorer

Fiddler works fine in Firefox but I cannot get it to work in Internet explorer. I tried uninstalling IE9 and it doesn't work in IE8 either. I normally wouldn't care so much as i does work in firefox; however, i read in ie9 the issue with localhost is gone so I would like to take advantage of that. I have looked around and cannot seem to find anyone with my same issue. Any thoughts on where to start?
Never heard about anyone having problem with Fiddler with IE.
The localhost problem is easily remedied. One writes a dot before or something like that.
IE9 has a built in request/response viewer. Not as competent as Fiddler but might work for you.
I also did not see the traffic from IE in Fiddler. What worked for me was to click and hold the button 'Any Process' in the toolbar and drag the target icon to the IE window.
Make sure IE doesn't replace fiddler mock response with the cached before one:
In IE11 you can press f12 to open dev tools and refresh the page (Ctrl + R) to see all the requests sent by the browser (in Network tab).
This is how the cached response looks like :
You can turn on force getting responses from the server and not from the cache with help of the button on the top ("Always refresh from server" button):
This is where you can find it.
People around the web have had a lot of trouble with fiddler. It turns out it is requiring a special certificate.
To fix it, go to tools>>>fiddler options>>>HTTPS and click Decrypt HTTPS Traffic, then click yes to both of the windows that appear.