← Back to context

Comment by yesitdoes22

11 hours ago

No actually. The only reason it crashes in dev tools is that it is rendering the printed console log.

If you printed to some div in the page, you will get the same effect.

Do you understand the topic? Doesn't seem like it

> Do you understand the topic? Doesn't seem like it

Since you are so polite I tested all of it just now and it turns out you are correct that running it directly from the devtools console does not cause any worse behavior than running it from a normal script tag.

However indeed logging only a single message simply causes it to be combined and show a counter instead of crashing. Logging two different messages causes the log to explode pretty instantly and hang DevTools fairly quickly.

For context on how not-crashy a single message log was, I was able to navigate to the Sources tab and pause the webpage in the middle of its infinite loop, which is not something you should be able to do if the DevTools are truly overwhelmed. (When that happens, sometimes the Sources tab simply does not load, other times trying to pause execution simply does nothing.)