Show HN: ChatGDB – GPT-Powered GDB Assistant (github.com)
ChatGDB is a tool designed to superpower your debugging experience with GDB, a debugger for compiled languages. Use it to accelerate your debugging workflow by leveraging the power of ChatGPT to assist you while using GDB!
It allows you to explain in natural language what you want to do, and then automatically execute the relevant command. Optionally, you can ask ChatGPT to explain the command it just ran or even pass in any question for it to answer. Focus on what's important - figuring out that nasty bug instead of chasing down GDB commands at the tip of your tongue.
See it here: https://github.com/pgosar/ChatGDB
56 comments
[ 3.3 ms ] story [ 104 ms ] threadWhen I had to use a dissasembler the issue was not commands, because those become muscle memory after a few hours of use. (LLM solutions are anti muscle memory because for the same prompt you can get diff results)
The issue I had was wrapping my brain around what is actually going on, keeping track of pointers, addresses and so on.
Maybe this chat solution can help with some of that, but I often am not sure what I actually am looking for so I can’t ask for it. Until I gets to “fix the bug/ find the overflow” I just don’t see the extra value.
Same problem when coding shell scripts. It’s like they tried to invent the hardest to remember language. I often use python instead of bash just because I can remember it and read it.
My few hours of usage is 30 different 5 minute stints over the course of 6 months. I don't remember anything between usages. English debugger prompts will be amazing.
And ALSO the type of thing where I think you can work out if it's bullshitting you on your own; if it works, it's not bullshitting.
GDB... probably a slowly enough moving target, though. ;)
And even on the things I've seen it get wrong, even in higher-churn areas like front-end-Javascript, it's usually "usefully wrong" in that now I've tried one more thing and often end up aware of several more things to look up to try to figure out the right one.
“Use GPT to do this thing!”
“But GPT is notorious for confidently getting things wrong”
“That’s ok! Because you’ll know it’s wrong!”
Maybe I’m a little sore right now because I literally just finished trying to have GPT write code for me and it gave me code with all kinds of syntax errors and mistakes. Yes, I know not to trust it because the compiler flagged the problems, but what now? I go write the code myself I guess. Yay GPT?
What problem is GPT solving here then?
It’s also not bad with explaining code, so it can help with the “where you are” bit, too.
Look, I've been doing this for 25 years, both as a career and continuously on the side for fun, and I am definitely an expert in a lot of things at this point. I'm allergic to saying crap like that about myself but feel it's necessary in this case, because it has transformed how I use a computer in a few short weeks.
My very first attempt with this stuff was actually a distinctly miserable experience and then something clicked. Wish I could articulate exactly what, but it's now one of the most joyous experience I've had in my career.
I had one bad experience last week where I burned 20 minutes as ChatGPT gave me one invalid approach after another. Then I consulted the docs and learned that waht I wanted to do explicitly couldn't be done with that library. Tens steps forward and one step back. Totally worth it.
It’s not great IME for writing large chunks of code, though some seem to be having good enough results there.
>One fun thing - after tracking down the code to the block of C++ code, ChatGPT-4 is what actually found the memory leak for me :)
although I can't imagine what the prompt was.
"Thinking step by step, what does this code do, is there a problem?"
It also makes me wonder if the command line will return as the premiere PC interface. Why would I want to use your web page with all its lovely design and branding when I can just ask the command line to show me the information the way I want?
Something like https://github.com/nvbn/thefuck but with some intelligence instead of hard-coded rules.
That's somewhat problematic if you have secrets in there, but you could just not use it if you know you have sensitive things in your shell history. You still need to be aware of that without ChatGPT since most systems save your shell history to the file system where it could remain accessible for much longer than you'd think. IIRC they don't use things from the API for training, but I wouldn't depend on that being safe.
Nah, seriously don't use it, is just a small experiment, curious thing is that half of the code is the GPT prompts..
I don't think the color scheme is Solarized Dark. Looks closer to Nord[2].
[1]: https://fonts.google.com/specimen/Fira+Code?preview.text=(gd...
[2]: https://github.com/nordtheme/terminal-app
https://github.com/pgosar/ChatGDB/blob/ee9d64b441939df163dc5...
It’s not a universal solution, as it’s specific to my data architecture, but if I were to devote a month to it I’m fairly sure I’d make a big dent in a generalized solution. And I’m VERY sure somebody else already 90% done we’ll see it on GitHub soon!