C++ Debugger for complete beginners

  Рет қаралды 12,093

Low Level Game Dev

Low Level Game Dev

Күн бұрын

Пікірлер: 93
@роскомнадзор-д8я
@роскомнадзор-д8я 2 ай бұрын
"dear beginners, please learn to use the debugger" bold of you to assume that my program compiles successfully
@lowlevelgamedev9330
@lowlevelgamedev9330 2 ай бұрын
🤣😂 I also have a video for that 😎
@lukasjetu9776
@lukasjetu9776 2 ай бұрын
the printf method is based 💯
@ika_666
@ika_666 2 ай бұрын
sometimes real debugging is more convenient and precise for checking complicated logic
@lukasjetu9776
@lukasjetu9776 2 ай бұрын
@@ika_666 i know but my dummy brain just chooses the simplest solution
@roccociccone597
@roccociccone597 2 ай бұрын
@@ika_666 print debugging is based though
@anynonamesays
@anynonamesays 2 ай бұрын
​@@ika_666 if project is big, debugger won't help you ('cause it cannot scale), but good logging and unit tests will. I personally don't use a debugger. Instead I just look at the code + sometimes use prints. If project grows, I'll just implement proper logging. So you can live without a debugger, because it is for specific uses, which I don't really mind spending more time on.
@autumnblaze6267
@autumnblaze6267 2 ай бұрын
in JS we have console.log and just opening the developer console is pretty much a debugger but without the checkpoints (you'll still need to console.log manually inside a loop, but honestly I never needed to learn proper debugging in JS (and I did wild stuff in JS: back end and even on the front end I do all the abstract professing (easy to translate into any other interpreted language - in C/C++ I'd have to worry about memory, but interpreted languages are all the same at this abstraction level) that never hooks into the DOM, API stuff), similar story with Python (I do way less Python, but the same logic applies): instead of running the program as regular, I run the Python interpreter and import the app - from that point on, I have access to everything (remember the namespaces, tho! )) I don't have the problems of all big boy programmers cos I'm just a cute lil soydev, writing my JS cutely while wearing a skirt and thigh highs, sipping on my soymilk choccy (actually carob cos I can't do cocoa 😂 my lil soydev tummy can't handle many things)
@wurlin_murlin
@wurlin_murlin 2 ай бұрын
Debugging is the most valuable skill all engineers can learn at all levels of abstraction (maybe after "being passionate"). If you are staring at code, or administrating a network service, or supporting some complex distributed cloud behemoth, or reverse engineering weird vendor products and protocols -- the skill of picturing & isolating components and being familiar with the tools to do so (be that a debugger or whatever else helps you see what's actually happening) always makes life less painful.
@Cinarbayramic
@Cinarbayramic 2 ай бұрын
i just use it to measure which function takes the most time and optimise it
@lowlevelgamedev9330
@lowlevelgamedev9330 2 ай бұрын
that's the profiler tho, its different
@Cinarbayramic
@Cinarbayramic 2 ай бұрын
@@lowlevelgamedev9330 or is it 🤨
@jonnyrichards
@jonnyrichards 2 ай бұрын
I love using a debugger specifically for gameplay stuff where there are lots of different variables that may or may not be causing the issue and instead of writing loads of print statements and reloading I can just test lots of different things on the fly.
@anynonamesays
@anynonamesays 2 ай бұрын
Write proper logging instead.
@uis246
@uis246 2 ай бұрын
Stalin debugging: rasstrelyat that bug
@VanOri
@VanOri 2 ай бұрын
Debuggers are the holy grail of programming
@xdoomgaming8896
@xdoomgaming8896 12 күн бұрын
The background music🔥🔥🔥
@speedg
@speedg 2 ай бұрын
"nothing the g'old print debugging cant fix"
@sealsharp
@sealsharp 2 ай бұрын
"Never assume you know what the problem is" and related: find and fix the real problem. When searching for a problem, it tends to happen that you will find the symptoms of problem and it will be supereasy to just put an end to the effects caused by the bug instead of actually fixing the root cause. Fix the real problem!
@BobChess
@BobChess 2 ай бұрын
non-debuggers when "Segmentation Error"
@darko_n6819
@darko_n6819 2 ай бұрын
GDB people could benefit by using some of them GDB GUIs but I can't assure you their quality.
@user-tw2kr6hg4r
@user-tw2kr6hg4r 2 ай бұрын
how is that an improvement
@SimGunther
@SimGunther 2 ай бұрын
What specifically needs to be improved about gdb GUI? I know people will make a laundry list the size of the Eiffel Tower, but still, I'd love to know exactly how we can make a better gdb GUI for all.
@Naburgondux
@Naburgondux 2 ай бұрын
Holy grail GDB,would've wasted much more hours than i should without it.
@LinguisticMirage
@LinguisticMirage 2 ай бұрын
giga chad moment
@lowlevelgamedev9330
@lowlevelgamedev9330 2 ай бұрын
yes indeed
@nevokrien95
@nevokrien95 2 ай бұрын
I use gdb for things but my goto is still printing and asserts
@user-du9ch3tn2v
@user-du9ch3tn2v 2 ай бұрын
I always ask my self is there a memory viewing tool for Linux like the one from visual Studio (maybe a Video about replacing visual Studio - removing Microsoft from your live)
@lowlevelgamedev9330
@lowlevelgamedev9330 2 ай бұрын
idk I don't use linux :)) there probably is. Clion has a debugger that had probably all the features that vs has.
@user-du9ch3tn2v
@user-du9ch3tn2v 2 ай бұрын
Well that's fair
@Markus_included
@Markus_included 2 ай бұрын
@@lowlevelgamedev9330 CLion's debugger is great (it's essentially just a frontend to gdb or lldb) but it's not quite on par with the vs debugger
@Goutham.070
@Goutham.070 2 ай бұрын
@@lowlevelgamedev9330 but clion is paid i guess
@drominitoketchup
@drominitoketchup 2 ай бұрын
that's also my current goal.
@vulnoryx
@vulnoryx 2 ай бұрын
Hi LowLevelGameDev. May I ask how you are handling different resolutions in your games? Like for example, I have a 1440p monitor and my 2d pixel art game looks good. But my friend for example has a 1080p monitor so everything looks zoomed in on his machine. How can I make it look the same on both resolutions without making it look scuffed.
@lowlevelgamedev9330
@lowlevelgamedev9330 2 ай бұрын
Yo so this is actually harder than it seems. For 2D it is actually harder than in 3D. In my Steam game I gave the player the option to zoom in and out from the settings. Other games automatically zoom for you so you all get the same experience. You need to do something like that. Start from 1080p amd zoom in for higher rezolutions. Other games request a sepcific aspect ratio so they just black out parts of the screen to get that aspect ratio, and than zoom you in to get the desired result. You can also set the screen resolution in full screen mode to your wanted aspect ratio, tho you need to mess with winapi for that, but I can show you how if you message me on discord.
@vulnoryx
@vulnoryx 2 ай бұрын
​@@lowlevelgamedev9330 Thanks a lot for your response. May I ask how I can find the value for the zoom? Dividing width by height only gives me the aspect ratio. (I dont want to mess with the win api since I mainly use Linux) Thanks again
@cameonn
@cameonn 2 ай бұрын
What font do you use? It looks awesome! (as subtitle)
@lowlevelgamedev9330
@lowlevelgamedev9330 2 ай бұрын
Kg second chances 💪
@cameonn
@cameonn 2 ай бұрын
@@lowlevelgamedev9330 thank you mister :)
@blackbeard3449
@blackbeard3449 2 ай бұрын
Do you know any good resources to learn gdb? In my experience, Those old tools have very sparse resources.
@lowlevelgamedev9330
@lowlevelgamedev9330 2 ай бұрын
nope and I honestly recomand using a gui debugger, but maybe try searching on yt
@vaibhavrohilla8647
@vaibhavrohilla8647 2 ай бұрын
How much years of blood and sacrifice it takes to become beast Chad c++ coder
@lowlevelgamedev9330
@lowlevelgamedev9330 2 ай бұрын
hmm, a few years of doing cpp every day should get you there for sure 💪💪
@tadeplayzz2282
@tadeplayzz2282 Ай бұрын
What compiler to you use
@lowlevelgamedev9330
@lowlevelgamedev9330 Ай бұрын
Microsoft Visual Studio
@Mad3011
@Mad3011 2 ай бұрын
I just don't get the anti debugger stance and insistence on adding printf statements that seems to be prevalent among certain circles. It's like not using oscilloscopes and multimeters when debugging a complex circuit board and instead staring at the pcb and soldering LEDs onto random spots. When I was just starting out I didn't use debuggers, mainly because I had no idea what they could do for me and did not know how to use them effectively. Two decades later and the debugger has become an indispensable tool. Learn to use both, learn when to use which and learn how to debug efficiently. Logging and debugging are not mutually exclusive, they go hand in hand.
@lowlevelgamedev9330
@lowlevelgamedev9330 2 ай бұрын
yes, thers no need to exclude any of them, the debugger is essential, and printt is very convinient for small things
@SylvanFeanturi
@SylvanFeanturi 2 ай бұрын
The comparison with LEDs is brilliant XD
@timmygilbert4102
@timmygilbert4102 2 ай бұрын
Heisenbug want to know your location
@lowlevelgamedev9330
@lowlevelgamedev9330 2 ай бұрын
I want to know its location 😂😂
@timmygilbert4102
@timmygilbert4102 2 ай бұрын
@@lowlevelgamedev9330 the observer perturbed the mesure, Heisenbug cease to exist the moment you look at it, it only exist when you don't, then it exist everywhere at once. That's quantic programming.
@ashtonkusmaul6907
@ashtonkusmaul6907 2 ай бұрын
Is rust even good for game dev?
@lowlevelgamedev9330
@lowlevelgamedev9330 2 ай бұрын
nope imo
@user-sb5vt8iy5q
@user-sb5vt8iy5q 2 ай бұрын
Can't be a coincidence that I spent 1 hour today because I forgot I copy pasted code that increment 'i' inside the for loop and inside the loop statement so I skipped half of the items...
@aghayejalebian7364
@aghayejalebian7364 2 ай бұрын
Great video
@Cnastret
@Cnastret 2 ай бұрын
I use neovim and I'm not leaving it. Guess I am going with gdb
@lowlevelgamedev9330
@lowlevelgamedev9330 2 ай бұрын
you can have the debugger sepparate from your ide
@drevcronsole
@drevcronsole 2 ай бұрын
//FIXME: This. Never been fixed.
@confidential8446
@confidential8446 2 ай бұрын
Debugger is hard to setup in c++
@gianluur6650
@gianluur6650 2 ай бұрын
printf gang
@matrixnetwork23
@matrixnetwork23 22 күн бұрын
Visual Stalin Debugger? Is there also a Hitler Debugger?
@lowlevelgamedev9330
@lowlevelgamedev9330 21 күн бұрын
maybe we should make one
@feivmoon
@feivmoon 2 ай бұрын
no🗿
@Nop_90h
@Nop_90h 2 ай бұрын
Sooo did u learn debugger? How is your vector class?😂
@lowlevelgamedev9330
@lowlevelgamedev9330 2 ай бұрын
precisely that was wat my problem with that thing there, you can't know that it is implementer right even with a debugger
@Doomslayer151
@Doomslayer151 2 ай бұрын
hehehe i not ise any of these i rocking without CMake hehehehehehe
@Hilent98
@Hilent98 2 ай бұрын
Meow
@sungoner5906
@sungoner5906 2 ай бұрын
uno
@stick101x2
@stick101x2 2 ай бұрын
dos
@sungoner5906
@sungoner5906 2 ай бұрын
Tres 🌲 ​@@stick101x2
@unschlagbar2302
@unschlagbar2302 2 ай бұрын
as a rust developer, i only need the debugger when i call extern c functions (vulkan)
@lowlevelgamedev9330
@lowlevelgamedev9330 2 ай бұрын
the debugger is not used only for null pointer exceptions, your program is not free of bugs because you use rust :))
@unschlagbar2302
@unschlagbar2302 2 ай бұрын
​​​@@lowlevelgamedev9330the print methods works great for the other bugs🙃
@user-tw2kr6hg4r
@user-tw2kr6hg4r 2 ай бұрын
dont use ide debugger wrappers, use a proper debugger instead. more generally, dont use an ide.
@lowlevelgamedev9330
@lowlevelgamedev9330 2 ай бұрын
how is visual studio not a debugger? I think its considered one of the best debuggers out there
@MichaelPohoreski
@MichaelPohoreski 2 ай бұрын
@@lowlevelgamedev9330 Visual Studio's debugger is slow as fuck. It is _good enough_ which is why most Windows programmers aren't motivated to learn about better tools.
@somenameidk5278
@somenameidk5278 2 ай бұрын
@@lowlevelgamedev9330 i think this guy is advocating for a command line text editor + gdb or lldb
@Egalobert
@Egalobert 2 ай бұрын
i'd argue that not using an IDE scales terrible for Real World Software where you need to keep track of 100s or 1000s of Files and 1000s upon 1000s Lines of Code, i highly doubt they're creating GTA6 in Neovim :D
@MichaelPohoreski
@MichaelPohoreski 2 ай бұрын
@@lowlevelgamedev9330 kzbin.info/www/bejne/qGrIgqeeabZooMk
@ManuelCam
@ManuelCam 2 ай бұрын
In 3:00 it says geam instead of game
Easy Debugging in OpenGL!
4:21
Low Level Game Dev
Рет қаралды 6 М.
Switch IS NOT FASTER than if, (in C++)
11:39
Low Level Game Dev
Рет қаралды 55 М.
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
This is the Best Pointers Video there is 💪
20:48
Low Level Game Dev
Рет қаралды 16 М.
2 Years of C++ Programming
8:20
Zyger
Рет қаралды 146 М.
Why I write C++ like it is C?
9:28
Low Level Game Dev
Рет қаралды 37 М.
Making a Game with Java with No Experience
8:41
Goodgis
Рет қаралды 666 М.
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 760 М.
Why is graphics programming SO HARD to learn? My story
6:41
Low Level Game Dev
Рет қаралды 17 М.
What I do to never have to worry about memory leaks!
8:03
Low Level Game Dev
Рет қаралды 47 М.
A New Era for C and C++? Goodbye, Rust?
9:08
Travis Media
Рет қаралды 115 М.
How a Microcontroller starts
28:49
Artful Bytes
Рет қаралды 61 М.
I linked all C++ gamedev Libraries, so you don't have to!
8:06
Low Level Game Dev
Рет қаралды 22 М.
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41