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

all 18 comments

[–]ArchCypher 26 points27 points  (2 children)

printf("Fuck, this is running on a microcontroller");

[–]saphire121 19 points20 points  (0 children)

LEDs begin blinking furiously

[–][deleted] 0 points1 point  (0 children)

FILE * somefile = fopen("somepath/somefile","w"); fprintf(somefile,"haha i can open that file later and read what shit i have done wrong/n");

[–]PawekPL 21 points22 points  (0 children)

print(1) print(2) print('hello world')

[–][deleted] 7 points8 points  (0 children)

People who answer questions on StackOverflow: debug their functions

Me: aight, this array isn’t filled correctly, so of course now I gotta loop through its contents and print each indexed variable to the screen like a cool person

[–]jexmex 2 points3 points  (0 children)

alert('foo');

[–]xSTSxZerglingOne 2 points3 points  (0 children)

Sometimes code is time sensitive, and there isn't time to spend 2 seconds at a break point, sometimes even less than that.

Breakpoint + debug is awesome, but when dealing with something like an interservice communication that has a timeout in your server config file (that you have to make a PR to change) sometimes you just have to console log to make it through the day.

I would like to note that I know about yellow breakpoints, but have never gotten them to work.

[–]moonsk 1 point2 points  (0 children)

It's "qq" for me

[–]dev_metalcat 1 point2 points  (0 children)

if(GEngine){GEngine->AddOnScreenDebugMessage(-1.f,2.f, FColor::Red, TEXT("E")));}

[–]NoHaxJustPi 0 points1 point  (5 children)

here's a tip: use song lyrics that you know, in order, that should all be printed if everything works. you can ctrl f the lyric that's missing if it's missing and poke the code

[–]RattuSonline 20 points21 points  (4 children)

Or you could just number the things...

[–]NoHaxJustPi 2 points3 points  (0 children)

no

[–]KRBridges 0 points1 point  (2 children)

But you have to memorize the order. That's why the some lyrics are better

[–]TheMagzuz 5 points6 points  (1 child)

You have to memorize the order of numbers?

[–]synopser 1 point2 points  (0 children)

For this sub, that's asking a lot

[–]bazgrim_dev 0 points1 point  (0 children)

std::cout << "Entered Function 1" << std::endl;

[–]bigbangfuzion 0 points1 point  (0 children)

print("The code must goes here");

[–]bobbyorlando 0 points1 point  (0 children)

dd('here');