Okay! Let’s put some your favorite music and big plants on, we are going to find this bug and kick them out of here!
- Checking the error log?
a. Good error log will show you the path, follow the path, and see what line causes the issue.
b. Google the error message, but remove your file path or something specific to your app, make it a little more general.
- Be a good friend with your chrome browser
a. Love their console log, network, and source tab
b. Their debug tools set breakpoint is really nice also.
3. The error very general or no error at all
This is the worst situation! First I will start comment out partial of code, but one by one first to see error is gone, if it is, then start dig deeper on the one your just comment out.
4. You run out all the idea? Still don’t know what happen
Narrow done the issue is the best way, identify what’s the new changes? If revert back does the error disappear?
Or rebuild parts of the app in codeSandbox you might find what cost it. It’s happened to me before, something silly I miss.
6. Still no luck? Ask fresh pair of eye
Let your co-worker or classmate or stack-overflow buddy to know:
- Post your code
- The issue you think might be
- What have you try to fix it
- What documentation you check
(Please make sure you try and google and fixes before you ask someone else, it’s part of learning)
Sometimes you just need extra help.
7. Walk a way from the problem
Sounds kind of negative? What I try to say is, if you are stuck in the same issue for an hour or two, your eyes and brain are tired, it’s really easily to miss some stuff in that situation.
True story from me, I’m stuck with one thing for days, and change multiple file, but does not work that great, so I drop it and come back later. Even I’m not solving the issue, but my brain still working behind the scene we just don’t know.
Then about 3 days later, some idea come out, I change one line of the file and works perfectly! Woohoo! Give myself a high five right there. That’s why enough rest is important!
Hope that help, share with me your troubleshoot idea, so I can learn from you.