pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

    <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="yqkso0y" 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="a0qeuuw" 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="qyk2k0y" id='FE8DG'><tfoot id='FE8DG'></tfoot><dl id='FE8DG'><fieldset id='FE8DG'></fieldset></dl></div>
                          主站蜘蛛池模板: 哈尔滨京科脑康神经内科医院-哈尔滨治疗头痛医院-哈尔滨治疗癫痫康复医院 | 金库门,金库房,金库门厂家,金库门价格-河北特旺柜业有限公司 | LED灯杆屏_LED广告机_户外LED广告机_智慧灯杆_智慧路灯-太龙智显科技(深圳)有限公司 | 高低温万能试验机_拉力试验机_拉伸试验机-馥勒仪器科技(上海)有限公司 | 山东信蓝建设有限公司官网| 烘箱-工业烘箱-工业电炉-实验室干燥箱 - 苏州华洁烘箱制造有限公司 | MES系统工业智能终端_生产管理看板/安灯/ESOP/静电监控_讯鹏科技 | 手板-手板模型-手板厂-手板加工-生产厂家,[东莞创域模型] | 九州网址_专注于提供网址大全分享推广中文网站导航服务 | 破碎机_上海破碎机_破碎机设备_破碎机厂家-上海山卓重工机械有限公司 | 定制液氮罐_小型气相液氮罐_自增压液氮罐_班德液氮罐厂家 | 交联度测试仪-湿漏电流测试仪-双85恒温恒湿试验箱-常州市科迈实验仪器有限公司 | 胃口福饺子加盟官网_新鲜现包饺子云吞加盟 - 【胃口福唯一官网】 | 蔬菜配送公司|蔬菜配送中心|食材配送|饭堂配送|食堂配送-首宏公司 | 全自动五线打端沾锡机,全自动裁线剥皮双头沾锡机,全自动尼龙扎带机-东莞市海文能机械设备有限公司 | 台湾阳明固态继电器-奥托尼克斯光电传感器-接近开关-温控器-光纤传感器-编码器一级代理商江苏用之宜电气 | 日本细胞免疫疗法_肿瘤免疫治疗_NK细胞疗法 - 免疫密码 | 【官网】博莱特空压机,永磁变频空压机,螺杆空压机-欧能优 | 5L旋转蒸发器-20L-50L旋转蒸发器-上海越众仪器设备有限公司 | 冰晶石|碱性嫩黄闪蒸干燥机-有机垃圾烘干设备-草酸钙盘式干燥机-常州市宝康干燥 | 液压油缸-液压站生产厂家-洛阳泰诺液压科技有限公司 | 蜘蛛车-登高车-高空作业平台-高空作业车-曲臂剪叉式升降机租赁-重庆海克斯公司 | 闸阀_截止阀_止回阀「生产厂家」-上海卡比阀门有限公司 | 青岛球场围网,青岛车间隔离网,青岛机器人围栏,青岛水源地围网,青岛围网,青岛隔离栅-青岛晟腾金属制品有限公司 | 滁州高低温冲击试验箱厂家_安徽高低温试验箱价格|安徽希尔伯特 | 防火门|抗爆门|超大门|医疗门|隔声门-上海加汇门业生产厂家 | 成都治疗尖锐湿疣比较好的医院-成都治疗尖锐湿疣那家医院好-成都西南皮肤病医院 | 瓶盖扭矩测试仪-瓶盖扭力仪-全自动扭矩仪-济南三泉中石单品站 | 沟盖板_复合沟盖板厂_电力盖板_树脂雨水篦子-淄博拜斯特 | 阳光1号桔柚_无核沃柑_柑橘新品种枝条苗木批发 - 苧金网 | 杭州用友|用友软件|用友财务软件|用友ERP系统--杭州协友软件官网 | POS机办理_个人pos机免费领取-银联pos机申请首页 | 活性炭-果壳木质煤质柱状粉状蜂窝活性炭厂家价格多少钱 | 危废处理系统,水泥厂DCS集散控制系统,石灰窑设备自动化控制系统-淄博正展工控设备 | 防腐木批发价格_深圳_惠州_东莞防腐木厂家_森源(深圳)防腐木有限公司 | 培训一点通 - 合肥驾校 - 合肥新亚驾校 - 合肥八一驾校 | 深圳离婚律师咨询「在线免费」华荣深圳婚姻律师事务所专办离婚纠纷案件 | 天津蒸汽/热水锅炉-电锅炉安装维修直销厂家-天津鑫淼暖通设备有限公司 | 软文世界-软文推广-软文营销-新闻稿发布-一站式软文自助发稿平台 | 冷凝锅炉_燃气锅炉_工业燃气锅炉改造厂家-北京科诺锅炉 | 本安接线盒-本安电路用接线盒-本安分线盒-矿用电话接线盒-JHH生产厂家-宁波龙亿电子科技有限公司 |