久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <tfoot id='AH5fh'></tfoot>
  1. <i id='AH5fh'><tr id='AH5fh'><dt id='AH5fh'><q id='AH5fh'><span id='AH5fh'><b id='AH5fh'><form id='AH5fh'><ins id='AH5fh'></ins><ul id='AH5fh'></ul><sub id='AH5fh'></sub></form><legend id='AH5fh'></legend><bdo id='AH5fh'><pre id='AH5fh'><center id='AH5fh'></center></pre></bdo></b><th id='AH5fh'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='AH5fh'><tfoot id='AH5fh'></tfoot><dl id='AH5fh'><fieldset id='AH5fh'></fieldset></dl></div>

    <small id='AH5fh'></small><noframes id='AH5fh'>

    <legend id='AH5fh'><style id='AH5fh'><dir id='AH5fh'><q id='AH5fh'></q></dir></style></legend>
        <bdo id='AH5fh'></bdo><ul id='AH5fh'></ul>

      在 Chrome 中的 XHR 中設置斷點

      Set a breakpoint in XHR in Chrome(在 Chrome 中的 XHR 中設置斷點)
        <tbody id='64rru'></tbody>

    1. <tfoot id='64rru'></tfoot>
        • <bdo id='64rru'></bdo><ul id='64rru'></ul>

          <small id='64rru'></small><noframes id='64rru'>

            <i id='64rru'><tr id='64rru'><dt id='64rru'><q id='64rru'><span id='64rru'><b id='64rru'><form id='64rru'><ins id='64rru'></ins><ul id='64rru'></ul><sub id='64rru'></sub></form><legend id='64rru'></legend><bdo id='64rru'><pre id='64rru'><center id='64rru'></center></pre></bdo></b><th id='64rru'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='64rru'><tfoot id='64rru'></tfoot><dl id='64rru'><fieldset id='64rru'></fieldset></dl></div>

                <legend id='64rru'><style id='64rru'><dir id='64rru'><q id='64rru'></q></dir></style></legend>
              1. 本文介紹了在 Chrome 中的 XHR 中設置斷點的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我有一個頁面在提交表單時發送 XHR 請求,我想讓 Chrome 在收到響應時中斷.實現這一點的最佳方法似乎是 Chrome 有一個我可以調用的 javascript 函數來中斷執行,但到目前為止我一直找不到類似的東西.還有其他解決方案嗎?

                I have a page that sends an XHR request when a form is submitted and I would like to get Chrome to break when it receives a response. It seems like the best way to accomplish this would be if Chrome has a javascript function that I can call that breaks execution but I've been unable to find anything like that so far. Is there another solution?

                編輯:

                我實際上沒有為請求定義回調,所以我不能那樣設置斷點.請求正在使用這行 jquery 代碼發送:

                I don't actually have a callback defined for the request so I can't set a breakpoint that way. The request is being sent with this line of jquery code:

                $.post(this.action, $(this).serialize(), null, "script");
                

                其中 this 是一個表單元素.null 參數是您通常定義回調的地方,但使用 "script" 參數,服務器返回原始 javascript 然后直接執行,所以它似乎是唯一的中斷和單步執行代碼的方法是使用 debugger; 語句.這可行,但是在單步執行代碼時,您實際上無法看到您所在的行,因此有點尷尬.我懷疑這是 Chrome 調試工具的限制.

                where this is a form element. The null argument is where you would usually define a callback but with the "script" argument, raw javascript is returned by the server and then directly executed, so it seems the only way to break and step through the code is with the debugger; statement. This works, but when stepping through the code you can't actually see which line you are on so its a little awkward. I suspect that this is a limitation of Chrome's debugging tools.

                推薦答案

                下拉 chrome 控制臺 (ctrl+shift+j) 并鍵入以下任意一個:

                drop down the chrome console (ctrl+shift+j) and type any of these:

                只需重寫jquery ajax:

                Just rewrite the jquery ajax:

                var prevajax = jQuery.ajax;
                jQuery.ajax = function () { debugger; return prevajax.apply(jQuery, arguments); };
                

                或者如果你沒有使用 jQuery,重寫 xhr 類:

                or if you are not using jQuery, rewrite the xhr class:

                var prevxhr = XMLHttpRequest;
                XMLHttpRequest = function (){debugger; prevxhr.apply(this, arguments);};
                

                中斷后,只需按shift+f11,直到找到發起ajax請求的方法.

                After it breaks, just press shift+f11 until you find the method which initiates the ajax request.

                這篇關于在 Chrome 中的 XHR 中設置斷點的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調用完成)
                JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標頭) - IT屋-程序員軟件開發技術分
                Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))
                NETWORK_ERROR: XMLHttpRequest Exception 101(NETWORK_ERROR:XMLHttpRequest 異常 101)
                XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內容)

              2. <small id='FE8DG'></small><noframes id='FE8DG'>

                <legend id='FE8DG'><style id='FE8DG'><dir id='FE8DG'><q id='FE8DG'></q></dir></style></legend>
                  <tbody id='FE8DG'></tbody>

                    <tfoot id='FE8DG'></tfoot>

                    • <bdo id='FE8DG'></bdo><ul id='FE8DG'></ul>

                        <i id='FE8DG'><tr id='FE8DG'><dt id='FE8DG'><q id='FE8DG'><span id='FE8DG'><b id='FE8DG'><form id='FE8DG'><ins id='FE8DG'></ins><ul id='FE8DG'></ul><sub id='FE8DG'></sub></form><legend id='FE8DG'></legend><bdo id='FE8DG'><pre id='FE8DG'><center id='FE8DG'></center></pre></bdo></b><th id='FE8DG'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='FE8DG'><tfoot id='FE8DG'></tfoot><dl id='FE8DG'><fieldset id='FE8DG'></fieldset></dl></div>
                          主站蜘蛛池模板: a级毛片免费高清视频 | 在线看av网址 | 国产三级 | 一区二区三区国产精品 | 色婷婷av99xx | www午夜视频 | 欧美精品在线免费 | 亚洲一区二区三区高清 | 国产精品久久久久久久久久妇女 | av资源中文在线天堂 | 干干干日日日 | 日韩午夜 | 精产国产伦理一二三区 | 精品在线一区二区三区 | 精品视频一区二区 | 久久网亚洲 | 喷水毛片 | 不卡一区 | 国产网站在线免费观看 | 久久精品国产一区二区电影 | 日韩视频一区在线观看 | 久久久久国产一区二区 | 国产区在线免费观看 | 欧美情趣视频 | 成人在线播放网址 | 欧美色偷拍 | 日韩精品一区二区三区在线观看 | 日本不卡一区 | h片在线观看免费 | 97视频久久| 久久久久亚洲视频 | 日韩不卡在线 | 国产精品美女久久久久aⅴ国产馆 | 欧美成人一区二免费视频软件 | 欧美日韩网站 | 欧美一级片中文字幕 | 国产精品久久久亚洲 | 亚洲免费在线视频 | 我爱操 | 国产精品日韩欧美一区二区三区 | 日韩在线观看 |