In my comment:
habrahabr.ru/post/177709/#comment_6169843 I described the extension problem from the corresponding article, besides the redirects there are also problems with the output of AJAX request logs and possibly in some cases with iframe headers.
I decided to find out why this was happening and realized that my statement was too categorical. After
webRequest stopped being experimental
developer.chrome.com/extensions/experimental.webRequest.html now you can write loggers “on headers” that handle all previously problematic situations. My goal is not to analyze all such situations, I would just like to show you how to modify the Chrome Logger extension to solve some of the above problems and maybe interest those who want to understand the Google Chrome extensions with a simple example. Maybe after reading a post, someone will have a desire to write their own extension.
The extension itself (current version 4.0.1) after installation is in most cases in the folder
for windows:
C: \ Users \ UserName \ AppData \ Local \ Google \ Chrome \ User Data \ Default \ Extensions \ noaneddfkdjfnfdakjjmocngnfkfehhd \ 4.0.1_0
for linux:
/home/user_name/.config/google-chrome/Default/Extensions/noaneddfkdjfnfdakjjmocngnfkfehhd/4.0.1_0
where
noaneddfkdjfnfdakjjmocngnfkfehhd is the
ID of this extension, see the figure below. This folder may be in another place, it all depends on the settings of your system, but I think you can easily find it now.

I recommend copying the 4.0.1_0 folder for further experiments to a convenient place on your disk, and removing the extension itself so that it does not “overlap” with the one being modified.
In the copied folder we are interested in the file
chromelogger.jsnamely the line:
chrome.webRequest.onResponseStarted.addListener (...
This line uses the
onResponseStarted method to display logs, but this method, according to the documentation for
webRequest developer.chrome.com/extensions/webRequest.html, works when:
Fires when the body is received.
those. after receiving the first byte of the response body, but since redirects have no body, their log is not displayed (as I wrote here:
habrahabr.ru/post/177709/#comment_6169843 )
in order for the log to be output, the
onResponseStarted method
must be replaced with the
onHeadersReceived method - now the line will look like:
chrome.webRequest.onHeadersReceived.addListener ( ...
after that we save the file, on the extensions page, turn on the checkbox “Developer Mode” and load our extension (folder 4.0.1_0) using the button “Load unpacked extension”. Activate it on the test page and try logging from the redirection script - now the log is displayed!
This is too simplified modification, perhaps in some situations the modified extension will not work correctly (for example, the
onHeadersReceived method may work more than once), but I did not intend to write a “full-featured” patch — I just wanted to show how it can be done.
')
PS For logging to the Google Chrome console, there is also a good extension
chrome.google.com/webstore/detail/php-console/nfhmhhlpfleoednkpnnnkolmclajemef working on cookies, the author promised here to redo it on
webRequest , but have not changed it yet . It perfectly logs redirects, ajax and iframe, but there are some problems with pop-up log notifications.
UPD: As it turned out from the comments - the author has already remade this extension and soon there will be a release of the new version!