Every 100-200 uses, I encounter a strange bug that I just can't seem to reproduce consistently. It's not a top priority to fix, but I would like to address it.
To investigate further, I would need to scatter about 30 console.log statements throughout my code. However, these logs clutter my console and disrupt the normal development process, making them a high price to pay for potential insights into the issue.
I'm contemplating the best approach. I've considered two options, but I'm not entirely satisfied with either:
- Create an array to store relevant information and display it in the console when the bug reappears.
- Write the information to a log text file and refer to it when the bug occurs.
Is there a better way to handle this? Which method would you choose, or is there another option I haven't considered?
EDIT: It's important to note that this behavior doesn't result in any errors, just an odd UI glitch.