Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Zlodo
Nov 25, 2006
ill give you my printf when you pry it from my cold, segfaulted hands

Adbot
ADBOT LOVES YOU

Zlodo
Nov 25, 2006
I use the debugger as much as I can but there are a lot of situations where the debugger isn't practical at all

like if a bug is caused by the interactions of several clients in a multiplayer game your only way to figure it out is logs and perhaps a frame by frame replay of a video capture of the bug (possibly with debug prints/draw enabled)

Zlodo
Nov 25, 2006
you can use either / or \ as path separators

// and \\ are escape sequences that let you include a / or a \ in a filename or directory name

Zlodo
Nov 25, 2006

Zlodo posted:

you can use either / or \ as path separators

// and \\ are escape sequences that let you include a / or a \ in a filename or directory name

i meant to post this in the yosos thread btw, it isn't my secret printf based debugging techinque

Zlodo
Nov 25, 2006

Cybernetic Vermin posted:

debuggers could be made a lot more user-friendly really.

Yeah. Data breakpoints for instance a super useful but in visual studio (considered by many as having the best c++ debugger ui) you have to input the address (in hex) and size of what you want to break on

usually you do that by adding a watch on it, copying the expression, wrapping it into a &() to get the address, and then copying that in the data breakpoint window

so they basically already have everything they need to implement a "add data breakpoint" in the context menu when right clicking a variable, and they have had all that for years, but nope, we still have to enter the address by hand

the again it took them like 15 years just to make the project properties window resizable

Zlodo
Nov 25, 2006
there are definitely situations when you need a super complicated break condition that you just cant fit into a conditional breakpoint and you can just call DebugBreak() inside of a if instead

Zlodo
Nov 25, 2006
sometimes code interacts with external stuff not controlled by the debugger and that is sensitive to timing (hardware, servers, other clients in peer to peer applications, etc.)

Adbot
ADBOT LOVES YOU

Zlodo
Nov 25, 2006
lldb is ok if you use it with a gui (like a vscode addon)

although we use it at work from inside visual studio on one of our target platforms and stepping is slow as hell, and for once I dont think it's visual studios fault

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply