I have some sample JS code that I am running in the browser and it uses Promise. I would like to debug the source code of the JS engine along with debugging my source code. Is there a way I can attach the JS engine source code in chrome developer tools?
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
V8 developer here. 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. Chrome DevTools can't debug V8's internals.
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.