I’m a career programmer, very comfortable writing programs in Python, and recently started learning Node.
I understand the asynchronous features are useful in many situations, but when I debug my code, I find myself adding await
before every single statement (including debug log statements), to be absolutely sure the program is doing what I expect, and is outputting logs in the order I expect so that I can see what is happening.
I always want my code to execute synchronously. Is there a better way to achieve this than adding await
at the start of every line?
SupaCowaFraja is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1