ÕâÀïÐèҪעÒâÒ»µã£¬Ö±½ÓÔÚ´úÂëÇø´òÓ¡±äÁ¿ÖµµÄ¹¦ÄÜÊÇÔÚ½Ïа汾µÄChromeä¯ÀÀÆ÷ÖвÅÐÂÔöµÄ¹¦ÄÜ£¬Èç¹ûÄ㻹ÔÚʹÓýÏÀÏ°æ±¾µÄChromeä¯ÀÀÆ÷£¬¿ÉÄÜÎÞ·¨Ö±½ÓÔڶϵãµÄÇé¿öϲ鿴±äÁ¿ÐÅÏ¢£¬´ËʱÄã¿ÉÒÔ½«Êó±êÒƶ¯µ½±äÁ¿ÃûÉ϶ÌÔÝÍ£¶ÙÔò»á³öÏÖ±äÁ¿Öµ¡£Ò²¿ÉÒÔÓÃÊó±êÑ¡ÖбäÁ¿Ãû³Æ£¬È»ºóÓÒ¼ü¡°Add to watch¡±ÔÚWatchÃæ°å²é¿´£¬´Ë·½·¨Í¬ÑùÊÊÓÃÓÚ±í´ïʽ¡£´ËÍ⣬Ä㻹¿ÉÒÔÔڶϵãÇé¿öÏ£¬Çл»µ½ConsoleÃæ°å£¬Ö±½ÓÔÚ¿ØÖÆ̨ÊäÈë±äÁ¿Ãû³Æ£¬»Ø³µ²é¿´±äÁ¿ÐÅÏ¢¡£¸Ã²¿·Ö±È½Ï¼òµ¥£¬¿¼ÂÇƪ·ùÎÊÌ⣬²»ÔÚ×öͼÑÝʾ¡£
Debugger¶ÏµãËùνµÄDebugger¶Ïµã£¬ÆäʵÊÇÎÒ×Ô¼º¸øËüÃüÃûµÄ£¬×¨ÒµÊõÓïÎÒÒ²²»ÖªµÀÔõô˵¡£¾ßÌåµÄ˵¾ÍÊÇͨ¹ýÔÚ´úÂëÖÐÌí¼Ó¡±debugger;¡±Óï¾ä£¬µ±´úÂëÖ´Ðе½¸ÃÓï¾äµÄʱºò¾Í»á×Ô¶¯¶Ïµã¡£½ÓÏÂÈ¥µÄ²Ù×÷¾Í¸úÔÚSourcesÃæ°åÌí¼Ó¶Ïµãµ÷ÊÔ¼¸ºõһģһÑù£¬Î¨Ò»µÄÇø±ðÔÚÓÚµ÷ÊÔÍêºóÐèҪɾ³ý¸ÃÓï¾ä¡£
¼ÈÈ»³ýÁËÉèÖöϵãµÄ·½Ê½²»Ò»Ñù£¬¹¦ÄܺÍSourcesÃæ°åÌí¼Ó¶ÏµãЧ¹ûÒ»Ñù£¬ÄÇôΪʲô»¹»á´æÔÚÕâÖÖ·½Ê½ÄØ£¿ÎÒÏëÔÒòÓ¦¸ÃÊÇÕâÑùµÄ£ºÎÒÃÇÔÚ¿ª·¢ÖÐż¶û»áÓöµ½Òì²½¼ÓÔØhtmlƬ¶Î£¨°üº¬ÄÚǶJS´úÂ룩µÄÇé¿ö£¬¶øÕⲿ·ÖJS´úÂëÔÚSourcesÊ÷ÖÖÎÞ·¨ÕÒµ½£¬Òò´ËÎÞ·¨Ö±½ÓÔÚ¿ª·¢¹¤¾ßÖÐÖ±½ÓÌí¼Ó¶Ïµã£¬ÄÇôÈç¹ûÏë¸øÒì²½¼ÓÔصĽű¾Ìí¼Ó¶Ïµã£¬´Ëʱ¡±debugger;¡±¾Í·¢»Ó×÷ÓÃÁË¡£ÎÒÃÇÖ±½Óͨ¹ýgifͼ¿´¿´ËûµÄЧ¹û£º
DOM¶Ïµãµ÷ÊÔDOM¶Ïµã£¬¹ËÃû˼Òå¾ÍÊÇÔÚDOMÔªËØÉÏÌí¼Ó¶Ïµã£¬½ø¶ø´ïµ½µ÷ÊÔµÄÄ¿µÄ¡£¶øÔÚʵ¼ÊʹÓÃÖжϵãµÄЧ¹û×îÖÕ»¹ÊÇÂäµØµ½JSÂß¼Ö®ÄÚ¡£ÎÒÃÇÒÀ´ÎÀ´¿´Ò»ÏÂÿһÖÖDOM¶ÏµãµÄ¾ßÌåЧ¹û¡£
µ±½ÚµãÄÚ²¿×Ó½Úµã±ä»¯Ê±¶Ïµã£¨Break on subtree modifications£©ÔÚÇ°¶Ë¿ª·¢Ô½À´Ô½¸´ÔӵĽñÌ죬ǰ¶ËJS´úÂëÔ½À´Ô½¶à£¬Âß¼Ô½À´Ô½¸´ÔÓ£¬Ò»¸ö¿´ËƼòµ¥µÄWebÒ³Ã棬ͨ³£°éËæ×Å´ó¶Î´ó¶ÎµÄJS´úÂ룬Éæ¼°Öî¶àDOM½ÚµãÔö¡¢É¾¡¢¸ÄµÄ²Ù×÷¡£ÄÑÃâÓöµ½Ö±½Óͨ¹ýJS´úÂëºÜÄѶ¨Î»´úÂë¶ÎµÄÇé¿ö£¬¶øÎÒÃÇÈ´¿ÉÒÔͨ¹ý¿ª·¢Õß¹¤¾ßµÄElementsÃæ°å£¬¿ìËÙ¶¨Î»µ½Ïà¹ØDOM½Úµã£¬Õâʱºòͨ¹ýDOM¶Ïµã¶¨Î»½Å±¾¾ÍÏÔµÃÓÈÆäÖØÒªÁË¡£¾ßÌåÎÒÃÇ»¹ÊÇͨ¹ýgifÑÝʾÀ´¿´Ò»Ï°ɣº
ÉÏͼÑÝʾÁ˶Ôul×ӽڵ㣨li£©µÄÔö¼Ó¡¢É¾³ýÒÔ¼°½»»»Ë³Ðò²Ù×÷´¥·¢¶ÏµãµÄЧ¹û¡£µ«ÐèҪעÒâµÄÊÇ£¬¶Ô×Ó½Úµã½øÐÐÊôÐÔÐ޸ĺÍÄÚÈÝÐ޸IJ¢²»»á´¥·¢¶Ïµã¡£
µ±½ÚµãÊôÐÔ·¢Éú±ä»¯Ê±¶Ïµã£¨Break on attributes modifications£©ÁíÒ»·½Ã棬ÓÉÓÚÇ°¶Ë´¦ÀíµÄÒµÎñÂß¼Ô½À´Ô½¸´ÔÓ£¬¶ÔһЩÊý¾ÝµÄ´æ´¢ÒÀÀµÔ½À´Ô½Ç¿ÁÒ£¬¶ø½«ÁÙʱÊý¾Ý´æ´¢ÓÚDOM½ÚµãµÄ£¨×Ô¶¨Ò壩ÊôÐÔÖУ¬ÊǺܶàÇé¿öÏ¿ª·¢ÕßÓÅÏÈÑ¡ÔñµÄ·½Ê½¡£ÌرðÊÇÔÚHTML5±ê×¼ÔöÇ¿×Ô¶¨ÒåÊôÐÔÖ§³Ö£¨Àý£ºdataset¡¢data-*Ö®Àࣩ֮ºó£¬ÊôÐÔÉèÖÃÓ¦ÓÃÔ½À´Ô½¶à£¬Òò´ËChrome¿ª·¢Õß¹¤¾ßÒ²ÌṩÁËÊôÐԱ仯¶ÏµãÖ§³Ö£¬ÆäЧ¹û´óÖÂÈçÏ£º
´Ë·½Ê½Í¬ÑùÐèҪעÒ⣬¶Ô×Ó½ÚµãµÄÊôÐÔ½øÐÐÈκβÙ×÷Ò²²»»á´¥·¢½Úµã±¾ÉíµÄ¶Ïµã¡£
µ±½Úµã±»ÒƳýʱ¶Ïµã£¨Break on node removal£©Õâ¸öDOM¶ÏµãÉèÖúܼòµ¥£¬´¥·¢·½Ê½ºÜÃ÷È·¡ª¡ªµ±½Úµã±»É¾³ýʱ¡£ËùÒÔͨ³£Çé¿öÓ¦¸ÃÊÇÔÚÖ´ÐС±parentNode.removeChild(childNode)¡±Óï¾äµÄʱºòʹÓô˷½Ê½¡£´Ë·½Ê½Ê¹Óò»¶à¡£
Ç°Ãæ½éÉܵ½µÄ»ù±¾ÉÏÊÇÎÒÃÇÔÚÈÕ³£¿ª·¢Öо³£Óõ½µÄµ÷ÊÔÊֶΣ¬ÔËÓõõ±ËüÃÇÒ²¼¸ºõÄÜÓ¦¶ÔÎÒÃÇÈÕ³£¿ª·¢Öеļ¸ºõËùÓÐÎÊÌâ¡£µ«ÊÇ£¬¿ª·¢Õß¹¤¾ß»¹¿¼Âǵ½Á˸ü¶àµÄÇé¿ö£¬Ìṩ¸ü¶àµÄ¶Ïµã·½Ê½£¬Èçͼ£º
XHR BreakpointsÕ⼸ÄêÇ°¶Ë¿ª·¢·¢ÉúÁË·Ì츲µØµÄ±ä»¯£¬´Óµ±³õµÄÃû²»¼û¾´«µ½Èç½ñµÄÊ¢¼«Ò»Ê±£¬AjaxÇý¶¯Web¸»Ó¦Óã¬Òƶ¯WebAppµ¥Ò³Ó¦Ó÷çÉúË®Æð¡£ÕâÒ»Çж¼Àë²»¿ªXMLHttpRequest¶ÔÏ󣬶ø¡°XHR Breakpoints¡±ÕýÊÇרΪÒì²½¶øÉúµÄ¶Ïµãµ÷ÊÔ¹¦ÄÜ¡£
ÎÒÃÇ¿ÉÒÔͨ¹ý¡°XHR Breakpoints¡±ÓÒ²àµÄ¡°+¡±ºÅΪÒì²½¶ÏµãÌí¼Ó¶ÏµãÌõ¼þ£¬µ±Òì²½ÇëÇó´¥·¢Ê±µÄURLÂú×ã´ËÌõ¼þ£¬JSÂß¼Ôò»á×Ô¶¯²úÉú¶Ïµã¡£ÑÝʾ¶¯»Öв¢Ã»ÓÐÑÝʾµ½¶ÏµãλÖã¬ÕâÊÇÒòΪ£¬ÑÝʾʹÓõÄÊÇjQuery·â×°ºÃµÄajax·½·¨£¬´úÂëÒѾ¹ýѹËõ£¬¿´²»µ½Ê²Ã´Ð§¹û£¬¶øÊÂʵÉÏXHR¶ÏµãµÄ²úÉúλÖÃÊÇ¡±xhr.send()¡±Óï¾ä¡£
XHR¶ÏµãµÄÇ¿´óÖ®´¦ÊÇ¿ÉÒÔ×Ô¶¨Òå¶Ïµã¹æÔò£¬Õâ¾ÍÒâζ×ÅÎÒÃÇ¿ÉÒÔÕë¶ÔijһÅú¡¢Ä³Ò»¸ö£¬ÄËÖÁËùÓÐÒì²½ÇëÇó½øÐжϵãÉèÖ㬷dz£Ç¿´ó¡£µ«ÊÇ£¬ËƺõÕâ¸ö¹¦ÄÜÔÚÈÕ³£¿ª·¢ÖÐÓõò¢²»¶à£¬ÖÁÉÙÎÒÓõò»¶à¡£ÏëÏëÔÒò´ó¸ÅÓÐÁ½µã£ºÆäÒ»£¬ÕâÀàÐ͵Ķϵãµ÷ÊÔÐèÇóÔÚÈÕ³£ÒµÎñÖб¾ÉíÉæ¼°²»¶à£»Æä¶þ£¬Ïֽ׶εÄÇ°¶Ë¿ª·¢´ó¶à»ùÓÚJS¿ò¼Ü½øÐУ¬×î»ù±¾µÄjQueryÒ²ÒѾ¶ÔAjax½øÐÐÁËÁ¼ºÃ·â×°£¬¼«ÉÙÓÐÈË×Ô¼º·â×°Ajax·½·¨£¬¶øÏîĿΪÁ˼õÉÙ´úÂëÌå»ý£¬Í¨³£Ñ¡ÔñѹËõºóµÄ´úÂë¿â£¬Ê¹µÃXHR¶Ïµã¸ú×ÙÏà¶Ô²»ÄÇôÈÝÒ×ÁË¡£
Event Listener Breakpointsʼþ¼àÌýÆ÷¶Ïµã£¬¼´¸ù¾ÝʼþÃû³Æ½øÐжϵãÉèÖᣵ±Ê¼þ±»´¥·¢Ê±£¬¶Ïµãµ½Ê¼þ°ó¶¨µÄλÖá£Ê¼þ¼àÌýÆ÷¶Ïµã£¬ÁгöÁËËùÓÐÒ³Ãæ¼°½Å±¾Ê¼þ£¬°üÀ¨£ºÊó±ê¡¢¼üÅÌ¡¢¶¯»¡¢¶¨Ê±Æ÷¡¢XHRµÈµÈ¡£¼«´óµÄ½µµÍÁËʼþ·½ÃæÒµÎñÂß¼µÄµ÷ÊÔÄѶȡ£
ÑÝʾʵÀýÑÝʾÁ˵±clickʼþ±»´¥·¢Ê±ºÍµ±setTimeout±»ÉèÖÃʱµÄ¶ÏµãЧ¹û¡£ÊµÀýÏÔʾ£¬µ±Ñ¡ÖÐclickʼþ¶ÏµãÖ®ºó£¬Á½¸ö°´Å¥µÄ±»µã»÷ʱ¶¼´¥·¢Á˶ϵ㣬¶øµ±setTimeout±»ÉèÖÃʱ£¬¡°Set Timer¡±¶Ïµã±»´¥·¢¡£
¡¡