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
TheToxicEuphoria
Feb 26, 2008
C:\> deltree

Only good program

Adbot
ADBOT LOVES YOU

Raluek
Nov 3, 2006

WUT.
KILLALLNERDS.EXE

Cybernetic Vermin
Apr 18, 2005

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

tbqh i sort of suspect that beginners would be more likely to use the debugger if you could invoke it with what looks like a function call, like "stopAndInspect(o)" which just breakpoints there, and brings up a nicely explorable watch of the object 'o'. just to remove the modality and often crummy ui of breakpoints from the learning process.

abigserve
Sep 13, 2009

this is a better avatar than what I had before
all my code works first time op sorry

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

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER

Cybernetic Vermin posted:

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

:yossame:

Debugging large data structure flows in clojure is a bitch and a half to the point where you're better off running each component in your pipeline in a REPL and looking for the error instead of the debugging in intellij.

Shaggar
Apr 26, 2006

Cybernetic Vermin posted:

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

tbqh i sort of suspect that beginners would be more likely to use the debugger if you could invoke it with what looks like a function call, like "stopAndInspect(o)" which just breakpoints there, and brings up a nicely explorable watch of the object 'o'. just to remove the modality and often crummy ui of breakpoints from the learning process.

nah, they should just be taught how to use the debugger a little more than not at all. its really not hard to add a break point to a line and then once they figure out that basic stuff they can be taught how to add conditions and watches.

telling them to write code to trigger the debugger is going to create bad habits.

akadajet
Sep 14, 2003

I had a javascript job a few years ago where all of the developers refused to learn the chrome debugger and instead just console.log'd everywhere. They used CoffeeScript too and were super concerned when I wanted to do the next project without it that learning proper javascript syntax would be some huge undertaking (it wasn't).

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


Shaggar posted:

nah, they should just be taught how to use the debugger a little more than not at all. its really not hard to add a break point to a line and then once they figure out that basic stuff they can be taught how to add conditions and watches.

telling them to write code to trigger the debugger is going to create bad habits.

i agree in general, but there's been at least one time for me when a "debugger, just loving break here" in compiled code has worked far better than any amount of fancy watches or break conditions. wish I could remember the details though

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

Bloody
Mar 3, 2013

Cybernetic Vermin posted:

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

tbqh i sort of suspect that beginners would be more likely to use the debugger if you could invoke it with what looks like a function call, like "stopAndInspect(o)" which just breakpoints there, and brings up a nicely explorable watch of the object 'o'. just to remove the modality and often crummy ui of breakpoints from the learning process.

https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.debugger.break?view=netframework-4.8

3D Megadoodoo
Nov 25, 2010

Ciaphas posted:

technically correct; all programs and programmers are bad

coders are bad, programmers are good (and they already checked it worked on paper)

yes that means no good software has been produced since the early 80s

Shaggar
Apr 26, 2006

Zlodo posted:

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

maybe but it should be absolutely your last resort and certainly not taught to new programmers.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Zlodo posted:

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

if you're the kind of person that does this, and I think it's fine in moderation, you should also be the kind of person who has a precommit hook to check for the existence of DebugBreak() in the commit

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


rotor posted:

if you're the kind of person that does this, and I think it's fine in moderation, you should also be the kind of person who has a precommit hook to check for the existence of DebugBreak() in the commit

I don't but that's because perforce is an arse that I cannot understand the flow or functions of for the life of me

bloody drat thing

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
perforce: pretty goddamn bad, actually.

The Management
Jan 2, 2010

sup, bitch?
debugger UI is very important and vastly underrated. having a window where you watch memory changing, one that shows you a backtrace, one that shows mixed code and assembly, one that shows local variables, and one that shows the cpu registers is a world away from a command line gdb where you have to reinspect everything you care about after every step.

The Management
Jan 2, 2010

sup, bitch?
I wrote this thread because my current project doesn’t have a debugger because dumb reasons and I’m using printf() and I want to die

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
debugger in Intellij idea is, as with most of the jetbrains stuff, super good.

Bloody
Mar 3, 2013

command line debuggers are impossibly stupid

akadajet
Sep 14, 2003

don’t sign

Share Bear
Apr 27, 2004

the only time ive ever used a debugger is in a web dev on 3rd party code

do people just not let their poo poo break and dump out gigantic traces? talking about BUSINESS code here, nothing of consequence

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe
tbh printf() is easier a lot of times

debuggers are good and they have their place

also they're a pain in the rear end compared to printfs, plus a lot of time you need to reduce your optimization levels to get good-quality debug tracing

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe
I'm writing a kernel module right now, and printk is way easier than trying to gdb that poo poo

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe
I will die on this hill

Private Speech
Mar 30, 2011

I HAVE EVEN MORE WORTHLESS BEANIE BABIES IN MY COLLECTION THAN I HAVE WORTHLESS POSTS IN THE BEANIE BABY THREAD YET I STILL HAVE THE TEMERITY TO CRITICIZE OTHERS' COLLECTIONS

IF YOU SEE ME TALKING ABOUT BEANIE BABIES, PLEASE TELL ME TO

EAT. SHIT.


Poopernickel posted:

I'm writing a kernel module right now, and printk is way easier than trying to gdb that poo poo

oh yeah I forgot about that, for kernel modules printk is a godsend

e: though I'm pretty sure it's not the proper way to debug a kernel module, it would be using a remote debugger I think

Private Speech fucked around with this message at 00:14 on Oct 25, 2019

The Management
Jan 2, 2010

sup, bitch?

Poopernickel posted:

I'm writing a kernel module right now, and printk is way easier than trying to gdb that poo poo

Linux kernel debugging is a POS, so printk is your only option.

akadajet
Sep 14, 2003

trying to imagine debugging an os kernel and laughing at the thought

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
i prefer pintf() where you just think really hard about it down at your local

The Management
Jan 2, 2010

sup, bitch?

akadajet posted:

trying to imagine debugging an os kernel and laughing at the thought

just stop all cores with jtag and debug, what’s the problem?

Private Speech
Mar 30, 2011

I HAVE EVEN MORE WORTHLESS BEANIE BABIES IN MY COLLECTION THAN I HAVE WORTHLESS POSTS IN THE BEANIE BABY THREAD YET I STILL HAVE THE TEMERITY TO CRITICIZE OTHERS' COLLECTIONS

IF YOU SEE ME TALKING ABOUT BEANIE BABIES, PLEASE TELL ME TO

EAT. SHIT.


The Management posted:

just stop all cores with jtag and debug, what’s the problem?

if it's drivers for an x86/amd64 linux then that's kinda not always an option, but you can get a remote serial debug interface set up, it's just a giant pain

e: windows driver debugging is ime actually a bit easier, but the inability to read through the kernel source sucks

Private Speech fucked around with this message at 03:06 on Oct 25, 2019

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.)

git apologist
Jun 4, 2003

actually I only write pure functions with no side effects at all, philistine

animist
Aug 28, 2018
good luck debugging the lambda calculus

BONGHITZ
Jan 1, 1970

is the xcode debugger good?

The_Franz
Aug 8, 2003

BONGHITZ posted:

is the xcode debugger good?

it's a gui on top of lldb

it works but it's not great

pram
Jun 10, 2001
osx has lldb and dtrace which is p good

The Management
Jan 2, 2010

sup, bitch?

pram posted:

osx has lldb and dtrace which is p good

lldb is terrible.

pram
Jun 10, 2001
i meant dtrace is good

Adbot
ADBOT LOVES YOU

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

The Management posted:

lldb is terrible.

nope

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