简体   繁体   中英

Javascript debuggers (Chrome and Webstorm) always break at non-existent breakpoint

The Chrome dev tools and Webstorm javascript debuggers always break at the line:

if(typeof qmLog !== "undefined"){

in the javascript file below even though there is no breakpoint there.

Do you have any idea how to avoid this breaking

 String.prototype.toCamelCase = function() { return this.replace(/(\\_[az])/g, function($1) { return $1.toUpperCase().replace('_', ''); }); }; var qm = { /// lots of stuff here... }; if (typeof qmLog !== "undefined") { qm.qmLog = qmLog; qmLog.qm = qm; } //if(typeof window !== "undefined" && typeof window.qmLog === "undefined"){window.qmLog = qm.qmLog;} // Need to use qm.qmLog so it's available in node.js modules if (typeof nlp !== "undefined") { qm.nlp = nlp; } if (typeof Quantimodo !== "undefined") { qm.Quantimodo = Quantimodo; } if (typeof window !== "undefined") { window.qm = qm; qm.urlHelper.redirectToHttpsIfNecessary(); } else { module.exports = qm; } 

In the Source tab of the JavaScript console, look for set breakpoints over in the right hand side. If there are any, Ctrl + Click on one of them and select Remove all breakpoints

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM