繁体   English   中英

Chrome 开发工具并没有在添加断点时停止,而是在 React 模块中出现不同的异常时停止

[英]Chrome dev tools didn't stopped on added breakpoints, instead they stopped at different exceptions present in React Modules

在这里,我在第 2、3、5、6、7 行添加了断点:

else{
    console.log('In the patch>>>>>>>started<<<<<<');
    axios.put(patchUser, { name : name, dateofbirth : dob, hobbies : hobby })
    .then((res) => {
        console.log(res);
        console.log("<<<<<<<<<<<<<<<<<>>>>>>In the patch....>>>>>>>>");
        alert(res);
        window.location.reload(false);
    })
}

并且,在下一个代码中,开发工具在第 4 行停止调试(抛出错误)

if (prefix === undefined) {
  // Extract the VM specific prefix used by each line.
  try {
    throw Error();
  } catch (x) {
    var match = x.stack.trim().match(/\n( *(at )?)/);
    prefix = match && match[1] || '';
  }
} // We use the prefix to ensure our stacks line up with native stack frames.


return '\n' + prefix + name;

} }

非常感谢您的任何支持。

当您进入开发工具中的“资源”时。 在您的最右边,您可以选择“停用断点”和“异常暂停”。 请看看你是否不小心按下了这些中的任何一个。

不是开发工具专业人士,但请记住,我曾一度为同样的事情苦苦挣扎 :)

最好的,符文

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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