久久久久久久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>
                          主站蜘蛛池模板: 国产精品国产精品国产专区不片 | 国产99久久久久 | 草草草网站 | 每日更新av| 日韩精品在线看 | 欧美高清视频在线观看 | 成人h免费观看视频 | 亚洲日日操 | www.国产一区| 亚洲毛片在线观看 | 日本成人在线播放 | 中文字幕欧美日韩 | 色播视频在线观看 | 国产成人精品一区二 | 涩爱av一区二区三区 | 国产一二三区在线 | 午夜天堂精品久久久久 | 午夜成人免费视频 | 波多野结衣一区二区三区在线观看 | 国产精品一区在线 | 天天搞天天搞 | 中文字幕乱码视频32 | 日韩在线精品视频 | 中文字幕一区二区三区在线观看 | 中文字幕av一区 | 日韩福利在线观看 | 久久久久一区 | 久久r免费视频 | 欧美精品一区二区三区一线天视频 | 日韩欧美国产一区二区三区 | 日韩成人性视频 | 亚洲视频三| 97精品国产一区二区三区 | 久久精品国产亚洲 | 日韩一区二区三区在线视频 | 91精品国产自产在线老师啪 | www.青娱乐| 一本一道久久a久久精品综合蜜臀 | 视频一二区 | 99re在线视频 | 亚洲精品电影网在线观看 |