[英]Debugging Chrome Javascript engine source code from Developer Tools
I have some sample JS code that I am running in the browser and it uses Promise.我有一些在浏览器中运行的示例 JS 代码,它使用 Promise。 I would like to debug the source code of the JS engine along with debugging my source code.我想调试 JS 引擎的源代码以及调试我的源代码。 Is there a way I can attach the JS engine source code in chrome developer tools?有没有办法可以在 chrome 开发者工具中附加 JS 引擎源代码?
UPDATE:更新:
const buyFlightTicket = () => {
return new Promise((resolve, reject) => {
setTimeout(() => {
const error = false;
if (error) {
reject("Sorry your payment was not successful")
} else {
resolve("Thank you, your payment was successful");
}
}, 3000)
})
}
buyFlightTicket()
.then((success) => console.log(success))
.catch((error) => console.log(error));
I have this piece of code and I want to understand what the Promise() function is doing with the function I am passing it as argument我有这段代码,我想了解 Promise() function 对 function 的作用我将它作为参数传递
V8 developer here. V8 开发人员在这里。 To debug V8 itself, you need a C++ debugger (like GDB or LLDB or Visual Studio's debugger), along with a Debug build of Chrome or V8.要调试 V8 本身,您需要 C++ 调试器(如 GDB 或 LLDB 或 Visual Studio 的调试器),以及 Chrome 或 V8 的调试版本。 Chrome DevTools can't debug V8's internals. Chrome DevTools 无法调试 V8 的内部。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.