Dear Beginners, Please Learn to use the DEBUGGER!

Поделиться
HTML-код
  • Опубликовано: 21 сен 2024
  • In this video, I will show you how to use the C++ debugger!
    Also check out how to fix C++ compile errors: 💪😱
    • How I solve all C++ Co...
    Check out my C++ Minecraft Clone! 🪨⛏️
    • Adding epic shaders to...
    Join my Discord:
    / discord
    Check out my Steam Game Midnight Arrow:
    store.steampow...
    Join this channel if you want to support me 😻:
    / @lowlevelgamedev9330
    Music: Evan King - e n t r o p ywww.youtube.co... soundtrack: C418 - Aria MathMinecraft soundtrack: C418 - Moog City

Комментарии • 66

  • @роскомнадзор-д8я
    @роскомнадзор-д8я 11 часов назад +10

    "dear beginners, please learn to use the debugger"
    bold of you to assume that my program compiles successfully

  • @murlinthewizard
    @murlinthewizard 21 час назад +6

    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.

  • @lukasjetu9776
    @lukasjetu9776 День назад +48

    the printf method is based 💯

    • @ika_666
      @ika_666 22 часа назад +2

      sometimes real debugging is more convenient and precise for checking complicated logic

    • @lukasjetu9776
      @lukasjetu9776 22 часа назад +2

      @@ika_666 i know but my dummy brain just chooses the simplest solution

    • @roccociccone597
      @roccociccone597 19 часов назад

      @@ika_666 print debugging is based though

    • @anynonamesays
      @anynonamesays 17 часов назад +1

      ​@@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 15 часов назад

      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)

  • @Cinarbayramic
    @Cinarbayramic День назад +16

    i just use it to measure which function takes the most time and optimise it

  • @VanOri
    @VanOri 22 часа назад +1

    Debuggers are the holy grail of programming

  • @jonnyrichards
    @jonnyrichards 19 часов назад +1

    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 17 часов назад

      Write proper logging instead.

  • @speedg
    @speedg 20 часов назад +2

    "nothing the g'old print debugging cant fix"

  • @Naburgondux
    @Naburgondux 19 часов назад

    Holy grail GDB,would've wasted much more hours than i should without it.

  • @darko_n6819
    @darko_n6819 22 часа назад +2

    GDB people could benefit by using some of them GDB GUIs but I can't assure you their quality.

    • @user-tw2kr6hg4r
      @user-tw2kr6hg4r 20 часов назад

      how is that an improvement

    • @SimGunther
      @SimGunther 20 часов назад

      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.

  • @LinguisticMirage
    @LinguisticMirage День назад +3

    giga chad moment

  • @BobChess
    @BobChess 5 часов назад

    non-debuggers when "Segmentation Error"

  • @uis246
    @uis246 20 часов назад

    Stalin debugging: rasstrelyat that bug

  • @sealsharp
    @sealsharp 20 часов назад

    "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!

  • @unschlagbar2302
    @unschlagbar2302 Час назад

    as a rust developer, i only need the debugger when i call extern c functions (vulkan)

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Час назад

      the debugger is not used only for null pointer exceptions, your program is not free of bugs because you use rust :))

    • @unschlagbar2302
      @unschlagbar2302 Час назад

      ​​​@@lowlevelgamedev9330the print methods works great for the other bugs🙃

  • @aghayejalebian7364
    @aghayejalebian7364 13 часов назад

    Great video

  • @cameonn
    @cameonn 20 часов назад

    What font do you use? It looks awesome! (as subtitle)

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  10 часов назад

      Kg second chances 💪

    • @cameonn
      @cameonn 9 часов назад

      @@lowlevelgamedev9330 thank you mister :)

  • @nevokrien95
    @nevokrien95 10 часов назад

    I use gdb for things but my goto is still printing and asserts

  • @user-sb5vt8iy5q
    @user-sb5vt8iy5q 19 часов назад

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

  • @blackbeard3449
    @blackbeard3449 9 часов назад

    Do you know any good resources to learn gdb? In my experience, Those old tools have very sparse resources.

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  8 часов назад

      nope and I honestly recomand using a gui debugger, but maybe try searching on yt

  • @user-du9ch3tn2v
    @user-du9ch3tn2v 23 часа назад +1

    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  23 часа назад +1

      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 23 часа назад

      Well that's fair

    • @Markus_included
      @Markus_included 23 часа назад

      @@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

    • @kgangadhar3621
      @kgangadhar3621 23 часа назад

      @@lowlevelgamedev9330 but clion is paid i guess

    • @drominitoketchup
      @drominitoketchup 23 часа назад

      that's also my current goal.

  • @Mad3011
    @Mad3011 6 часов назад

    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  5 часов назад

      yes, thers no need to exclude any of them, the debugger is essential, and printt is very convinient for small things

  • @user-tw2kr6hg4r
    @user-tw2kr6hg4r 20 часов назад

    dont use ide debugger wrappers, use a proper debugger instead. more generally, dont use an ide.

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  20 часов назад +3

      how is visual studio not a debugger? I think its considered one of the best debuggers out there

    • @MichaelPohoreski
      @MichaelPohoreski 20 часов назад

      @@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 3 часа назад

      @@lowlevelgamedev9330 i think this guy is advocating for a command line text editor + gdb or lldb

  • @Hilent98
    @Hilent98 День назад +1

    Meow

  • @sungoner5906
    @sungoner5906 День назад

    uno

  • @ManuelCam
    @ManuelCam 3 часа назад

    In 3:00 it says geam instead of game