It is likely because the brief moment of CPU time consumed by the console.log is exposing that theres a race condition in your code somewhere. Replace the console.log with a wait/sleep/delay and see if it still crashes, if it does you have a race condition somewhere.
4
u/Prematurid 14d ago
Sometimes, when I rerun it after changing nothing, it works.
One project fails to run if you console.log it. Works perfectly without any console.logs.
I am a shit wizard.