当debbuger打开时,Chrome不显示某些console.log消息

时间:2017-07-25 19:06:29

标签: javascript google-chrome console.log

我正在上传视频文件,想要查看进度。对于调试,我正在使用:

xhr.upload.onprogress = function(evt){ console.log('progress', evt.loaded/evt.total*100) }; 

当chrome调试器打开时,不显示这些进度消息,但是其他console.log消息是。

当chrome调试器关闭时,将显示所有console.log,包括" progress"消息:

    success.orderid=  OK END
20:56:59.183 Test:165 2
20:56:59.590 Test:165 Fin de lecture de la vidéo
20:56:59.592 Test:269 xhr
20:56:59.592 Test:271 xhr created
20:56:59.592 Test:272 xhr.upload existe
20:57:01.616 Test:274 progress 0.10959526385110777
20:57:01.818 Test:274 progress 0.8767621108088621
20:57:01.918 Test:274 progress 1.917917117394386
20:57:02.020 Test:274 progress 3.8495336427701603
20:57:02.119 Test:274 progress 4.918087465318461

了解这种行为?

0 个答案:

没有答案