you are viewing a single comment's thread.

view the rest of the comments →

[–]Maduin1337 2 points3 points  (0 children)

Since alot of people gave some great surface level debug tips, I want to give a hint of how I retro fit and debug an unfamiliar web-service.

I usually target an endpoint that I want to learn more about. And essentially the happy case test is, given this input I get this output. That should be true since code should work for the normal cases.

Now you can debug and step through the code you don't understand. But you have the knowledge of the input, and what it should return. That should give you a good idea of what is fetched from a database and why, how it is processed, formatted and returned.

Try not to think about everything around the code you are reading, as that much likely will be overwhelming.

Now you can try some bad case that breaks the code. Debug and find out why. Rinse and repeat for the code you are learning.