News for hackers. Stuff that matters.
Re:Console.table() by mort96 on Thursday June 14, 2018 @04:27AM (#17310240)
It has little to do with IDEs and everything to do with debuggers. When writing code in emacs or vim, as long as you compile with -g and run the binary with gen, you get the features you're talking about.
Re:Console.table() by pjmlp on Thursday June 14, 2018 @04:50AM (#17310328)
Unless you are speaking about something like DDD, not really.

Also it has to do with IDE, because in an IDE there is two way communication between both tools, like the ability to do edit-and-continue.

Re:Console.table() by mort96 on Thursday June 14, 2018 @08:04AM (#17310983)
Look at this: https://news.ycombinator.com/item?id=17310418

It's not quite as fancy as an IDE, but it's a lot more than printf.

Re:Console.table() by earenndil on Saturday June 16, 2018 @03:24AM (#17326374)
What's gen? It's not very googlable ('gen debugger' gives nothing relevant), and asking my package manager for a package providing 'gen' just gives some game.
Re:Console.table() by mort96 on Tuesday June 19, 2018 @01:50PM (#17348801)
Oh wow, I didn't notice that. I wrote gdb, but my phone autoincorrected it to gen.
Re:Console.table() by oblio on Thursday June 14, 2018 @05:16AM (#17310418)
Could you show a screenshot?
Re:Console.table() by mort96 on Thursday June 14, 2018 @06:39AM (#17310665)
Here's a recording of using GDB: https://s.mort.coffee/d/vid/gdb-demo.mp4

Here's a recording of using GDB's TUI mode: https://s.mort.coffee/d/vid/gdb-tui-demo.mp4

Note that I'm not a GDB pro, I just recently started trying to use it more instead of printf, so there are probably lots of stuff I didn't show off. (For example, I wish I'd shown the `bt` command to print stack traces).

Another thing that's worth noting is that with GDB, if your program crashed and generated a coredump, you can use GDB to look at how everything was when it crashed, just like if you were debugging a running program. This is extremely useful on for example embedded systems where you don't have GDB installed, or when the crash is hard to reproduce.

Re:Console.table() by oblio on Thursday June 14, 2018 @08:58AM (#17311277)
I know that GDB is powerful and scriptable and very useful in environment where you don't have anything else. But I'm sorry to say, what you showed wasn't very discoverable and the UI was faaar from amazing.

I don't know if you've tried it, but whenever you have a bit of time try Visual Studio's (or even Visual Studio Code's) debugger. They're among the best visual debuggers out there. Or IntelliJ's.

You see directly all the variables as you step through code, you can see array contents directly, they're super discoverable, etc.

It's such a shame that there's no glory (or money) to be had in designing CLI/TUIs. I also get the impression that it would be really hard to change things, OSS maintainers have a reputation for being very stubborn about workflow changes (sometimes for good reasons, sometimes not) :(

Re:Console.table() by camgunz on Thursday June 14, 2018 @12:10PM (#17312680)
GDB's main power is that it's scriptable. You can track down some pretty gnarly bugs with that. You don't necessarily need that capability for languages like JS, because there's far less danger of getting into serious trouble (stack corruption, etc.), so it's hard to appreciate. But yeah, discoverable it is not haha.
Re:Console.table() by pjmlp on Thursday June 14, 2018 @12:24PM (#17312800)
All major Java and .NET IDEs have debugging APIs as well.

As for the data visualizers, as mentioned, with Java and .NET I can do it with a bit of annotations and the debugger takes it from there.

Or in C++'s case when using Visual Studio, a bit of XML describing the metadata.

Re:Console.table() by camgunz on Thursday June 14, 2018 @03:37PM (#17314684)
Oh yeah, totally true. All I meant was GDB's power interface is scripting. I definitely think IDE debuggers are better.
Re:Console.table() by TickleSteve on Thursday June 14, 2018 @09:18AM (#17311421)
Thats just a textual display of the structures, not a different presentation (i.e. a graphical tree or table, allbeit in text mode).

BTW: In GDB, all commands have shortcuts i.e. 'b'=='break'. (Saves a lot of time).