Chrome dev tools fails to show response even the content returned has header Content-Type:text/html; charset=UTF-8

后端 未结 9 1113
轮回少年
轮回少年 2020-12-12 11:25

Why does my chrome developer tools show \"Failed to show response data\" in response when the content returned is of type text/html?

What is the alternative to see t

相关标签:
9条回答
  • 2020-12-12 12:17

    If you make an AJAX request with fetch, the response isn't shown unless it's read with .text(), .json(), etc.

    If you just do:

     r = fetch("/some-path");
    

    the response won't be shown in dev tools.
    It shows up after you run:

    r.then(r => r.text())
    
    0 讨论(0)
  • 2020-12-12 12:22

    As described by Gideon, this is a known issue.
    For use window.onunload = function() { debugger; } instead.
    But you can add a breakpoint in Source tab, then can solve your problem. like this:

    0 讨论(0)
  • 2020-12-12 12:23

    Bug still active. This happens when JS becomes the initiator for new page(200), or redirect(301/302) 1 possible way to fix it - it disable JavaScript on request. I.e. in puppeteer you can use: page.setJavaScriptEnabled(false) while intercepting request(page.on('request'))

    0 讨论(0)
提交回复
热议问题