How does Chrome check to see if there is JS code running?

We found that sometimes browsers get stuck, especially in the case of a code loop, so we wonder if there is JS code running.

at present, we have two ways to judge:
1. Add console.log output everywhere, and then see if the output is continuous
2. Check the computer"s task manager to see if Chrome"s CPU share has remained high

.

however, neither of these approaches is perfect. The first kind you need to add a lot of console output, the second kind can only be a kind of inference.

excuse me, does Chrome provide an interface to see how the JS code is running?
for example, can you see any JS code that is executing, running efficiently, taking up memory, and so on?

Thank you

Mar.12,2021

Open Google console, Memory-> Profiles


developer tools, Performance-> record-> stop the running status information of the current browser is all in

.
Menu