Hey coders! Dive into this quick DDD tutorial to learn the Data Display Debugger for C++ and C programs. See how to launch DDD, set breakpoints, view source code, and use the GDB console. I’ll walk you through the basics, but check my GDB video first for a better debugging foundation. If you’re new to GUI debuggers or just curious, this is for you! Subscribe for more programming tips, and let me know in the comments if you want advanced DDD content. Scan the QR code for more tutorials!
Introduction to DDD 00:00:00
DDD vs GDB Comparison 00:00:04
Installation Instructions 00:00:56
Launching DDD 00:01:20
Source Code Window 00:01:57
Setting Breakpoints 00:03:16
Running and Debugging 00:04:08
GDB Console Commands 00:04:21
Modifying Breakpoints 00:05:20
Closing DDD 00:05:36
Recommendation to Learn GDB 00:05:48
Call to Subscribe 00:06:32
Website and Comments 00:07:17
Thanks for watching!
Find us on other social media here:
- https://www.NeuralLantern.com/social
Please help support us!
- Subscribing + Sharing on Social Media
- Leaving a comment or suggestion
- Subscribing to our Blog
- Watching the main “pinned” video of this channel for offers and extras
DDD debugger, Data Display Debugger, debugging tutorial, C++ debugging, C debugging, GDB debugger, programming tutorial, software debugging, coding for beginners, debugger GUI, set breakpoints, source code debugging, Ubuntu debugging, learn to code, programming tips
hey there in this video i’m going to give you a very very quick overview
of a program called ddd which you can use to debug your programs
disclaimer you should see my gdb video first before you watch this one because it’s much more
useful and in my personal opinion gdb is a much better debugger than ddd ddd ddd is actually
over GDB so it doesn’t really add any more functionality it’s sort of for
people who like to use GUI’s but the GUI is not it’s not very good but it’s
there if you’re still struggling with the command line anyway so yeah see my
other video if you want to learn about make files if you want to learn about
C++ C assembly GDB debugging all that stuff are in other videos but assuming
that you know how to use GDB we can start on DDD now DDD anyway if you don’t
Anyway, if you don’t have DDD on your system, you can go sudo apt install DDD.
I’m on Ubuntu.
You could use whatever package manage you have on your system like DNF or whatever.
So sudo apt install DDD.
I don’t have to do that because I already have it on my system, unfortunately.
Anyway, so the first thing that you can do is you can sort of launch it with DDD up here.
It’s called the data display debugger.
You can launch it and then you can attach it to your program for me.
attach it to your program for me i like to just launch it uh from the command line i’ll type ddd
and then the name of my executable i’ll build my executable real fast again this all this stuff is
in another video how to build and you know what so forth so i’m going to build my uh executable
and there it is main so i’m going to go ddd main and this is the uh i can’t remember the name of
display debugger yeah I don’t really like to use this anyway you can see that
right away there is a source code window visible which sort of looks at your
program’s source code if that’s not visible you can click on the view menu
item up here and start you know enabling and disabling windows there’s a data
window to let you look at data there’s a machine code window I’m just gonna
basically make sure that the GDB console is up and that the source window is up
when I closed both windows hoping that I could show you that I opened both of them it just shut
down the whole program okay anyway so yeah click view and make sure that the source windows open
so we can see our source code and then also make sure that the gdb console window is open so we can
type gdb commands and then um well you know probably if you know gdb you’ll you’ll you’ll
want to start typing commands here you know enter a breakpoint at main.cpp line you know
dot cpp line you know whatever but once you start doing that a lot you’ll realize maybe you don’t
need to be inside of ddd with ddd you can right click on a line and add a breakpoint manually so
that’s a little convenient i think we can do can we do control mouse no there’s a lot of obscure
areas here well you can go to the preferences and change the font size i think i’m not going to deal
with that in this video but so suppose for the sake of argument i wanted to break at this line
line right here I could just right click on it and I have to hold down the right
mouse and say set breakpoint and then I could do the same thing for this set
breakpoint and then for this set breakpoint so it’s a little more
convenient a little bit faster if you like looking at the text in this way to
set breakpoints and then you can disable breakpoints and you can delete breakpoints
and you can reset the execution position if you’re absolutely sure you know what
know what you’re doing you can have your program skip an area and jump somewhere and then once
i’ve kind of set up my break points i can go up here at the top this is the uh i forgot what
window this is called but i can basically hit run which i accidentally already clicked when i was
trying to resize the window there we go oh i can’t resize it okay so we’ll go run and uh
well now we’ve already hit a breakpoint right away notice how at the bottom in the gdb uh
GDB console area it says breakpoint 2 at line 36 and then there’s a green arrow here letting
us know that we hit one of our breakpoints already so then we can do normal GDB stuff
we can go info breakpoints just to kind of see what’s in there and you can resize with this
handle on the very right side I don’t think it works in the middle here I’ve tried it many times
but so you can kind of resize with this handle on the right side to get more real estate for
panel and so it’s telling me all right I did info breakpoints just to see the
breakpoints I can go info locals to see my local variables like a print a
variable you know all that all the normal GDB commands I’m gonna hit
continue and five to skip the next five times this breakpoints get hit this
breakpoint gets hit now the next breakpoint that gets hit is this other
one over here I can do the same thing info locals I can see the state of all
what is b you know what is i what is a what is whatever and when i’m finished i can say continue
and i can also modify my breakpoints by just sort of like deleting them enabling them disabling them
but that’s me trying to type everything in the terminal of course with ddd you can right click
on a breakpoint and disable it or delete it and so forth when you’re eventually done let’s see
kill the process and then you can just kind of exit DDD at this point or you can exit
the GDB console with Q and that’s it that’s the basics for DDD.
However again I strongly encourage you to learn GDB first and by the time you do that
you will probably not want to use DDD.
But I have to put up this video regardless.
Let me know if you’re interested in very advanced stuff covering DDD.
20 years, I might upload another DDD video. You never know.
Okay, thanks for watching this video.
I hope you learned a little bit, and I hope you go directly to the GDB video after this.
See you in the next one.
Hey everybody, thanks for watching this video again from the bottom of my heart. I really
appreciate it. I do hope you did learn something and have some fun. If you could do me a please,
Could you please subscribe and follow this channel or these videos or whatever it is you do on the current social media
Website that you’re looking at right now
It would really mean the world to me and it’ll help make more videos and grow this community
So we’ll be able to do more videos longer videos better videos or just I’ll be able to keep making videos in general
So please do do me a kindness and and subscribe
You know sometimes I’m sleeping in the middle of the night and I just wake up because I know somebody subscribed or followed
subscribed or followed. It just wakes me up and I get filled with joy. That’s exactly what happens
every single time. So you could do it as a nice favor to me or you could you could troll me if
you want to just wake me up in the middle of the night just subscribe and then I’ll just wake up.
I promise that’s what will happen. Also if you look at the middle of the screen right now you
should see a QR code which you can scan in order to go to the website which I think is also named
somewhere at the bottom of this video and it’ll take you to my main website where you can just
all the videos i published and the services and tutorials and things that i offer and all that
good stuff and uh if you have a suggestion for uh uh clarifications or errata or just future videos
that you want to see please leave a comment or if you just want to say hey what’s up what’s going on
you know just send me a comment whatever i also wake up for those in the middle of the night i
get i wake up in a cold sweat and i’m like it would really it really mean the world to me i
really appreciate it. So again, thank you so much for watching this video and enjoy the cool music
as I fade into the darkness, which is coming for us all.
Thank you.