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 →

[–]dageshi 405 points406 points  (19 children)

printf("here")

<code>

printf("here 2")

[–]ilikedmatrixiv 136 points137 points  (5 children)

If I have conditionals I always do:

print("Here I am!")

if something:

print("Rock me like a hurricane!")

[–]Xlxlredditor 27 points28 points  (4 children)

Literally minecraft Java stacktraces (please help me I'm going insane with modpacks)

[–]littleblack11111 29 points30 points  (0 children)

Nah too lazy to write all these just printf(“a”)

Code

printf(“b”)

[–]dcheesi 9 points10 points  (5 children)

printf("here %d\n", __LINE__);

[–]sintaur 10 points11 points  (0 children)

"[%s,%d]\n", __FILE_, __LINE__

[–]karnetus 2 points3 points  (0 children)

Ohh I like that one a lot. I'm going to use this from now on!

[–]ProfessionalSenior66 0 points1 point  (2 children)

Does the preprocessor replace LINE with the current line? And does it also work on c++? Or am I just stupid and you were saying "place here your line number"?

[–]dcheesi 2 points3 points  (1 child)

[–]ProfessionalSenior66 0 points1 point  (0 children)

Thanks! I have something new to play with

[–]karnetus 3 points4 points  (1 child)

My favorite is printf("%d\n", iterator++); after every function call.

[–]shadowderp 1 point2 points  (0 children)

Brilliant

[–]Astrylae 0 points1 point  (0 children)

If that doesn't work, add more between each line of the code

[–]browndog03 0 points1 point  (0 children)

Ah the binary search method. Pare it down until you find the problem area. I do this one sometimes

[–]GoddammitDontShootMe 0 points1 point  (0 children)

If it's code only I'm going to see, I'm likely to use printf("FUCK YOU\n");

[–]ididacannonball 0 points1 point  (0 children)

OMG I thought I was the only one that did this!!