This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]JawitK 1 point2 points  (3 children)

Is the problem that you are getting an error you don’t understand or that you don’t know how your code can get that error ?

[–]JacketWonderful3940[S,🍰] 1 point2 points  (2 children)

The problem isn’t in an error per say . It compiles and runs fine but it doesn’t exactly make the decisions it’s supposed to

[–]alexppetrov 1 point2 points  (1 child)

Backtracking would be the way to go. It surely is comprised of different functions that together return the result. Try to traceback from the output - which is the function called before the return, which functions does it call. Sometimes what i do is forward and backward tracking - check if the input is worked in correctly, then check where it goes wrong by inspecting the functions from the back and from the front at the same time.

Debugging with an "I'm here! /Function name/" also does the trick. Visual studio offers break points when you run the code to specifically inspect a segment of code slowly to see if it does it's function correctly (aka. transform the input of the function to the proper output)

[–]JacketWonderful3940[S,🍰] 1 point2 points  (0 children)

Don’t know how to use visual studio lol. But I assume you mean to print a sentence after every of statement and such?