DEV Community

Alex Tran
Alex Tran

Posted on

When in doubt console.log it out

I'm currently working on an app that requires me to fix a complex feature that allows the user to upload multiple images to Amazon s3 cloud storage and I'm completely lost as to where the problem is coming from. I first looked at the code with my front-end engineer and my data science engineer to get a better understanding of how the feature was originally implemented. I then start from the beginning which is the front-end code. While debugging I found a more efficient way of uploading multiple files so I implemented that and confirm from my back end that the file is being uploaded. I then check the back-end upload function to see if it has successfully uploaded the file to s3. While debugging the back end I decided to re-write the entire upload function keeping what is important and changing what needs to change. Along the way there were a lot of challenges, bugs popping up out of nowhere and happening at different time intervals. One thing that really helped me was console logging every part of the way to see where the function break and to navigate the file structure. And yes, I know that the debugger is way more efficient than putting in console.log but this title wouldn't rhyme and sound as cool.

Top comments (3)

Collapse
 
angeelrdz profile image
Angel Rodríguez

According to you, the debugger is much more efficient than putting in console.log although sometimes it is very difficult for me to use the debugger hehe

Collapse
 
alextran profile image
Alex Tran • Edited

I am shocked that anyone found this post! thank you for reading all of it!

Collapse
 
_echo3d_ profile image
echo3D

100% haha