• dlachausse 10 hours ago

    I never heard it called caveman debugging before but I love the name.

    I am a huge fan of print debugging. Debuggers have their place, but most of the time print is just easier and it fits better into my mental model.

    • jmclnx 9 hours ago

      I agree, but I have found gdb is great for core dumps. Getting Linux to create one, another issue :)

      BSDs though just creates them when your program dumps for you enjoyment.

    • satisfice 5 hours ago

      Ever since I was gifted with a Kontron chip emulator debugger for my work in Assembly language, and enjoyed total control over my universe, I almost simultaneously discovered that using it greatly slowed down my debugging. It made me lazy. I bet Sauron would have won MiddleEarth if he wasn’t so hung up on his Palantir stone.

      Ever since, I redoubled my effort to use my brain for debugging, plus simple print statements and logging. Only when I am ready to jump out a window do I fire up a debugger.

      (BTW, for three years I was in charge of the Borland Turbo Debugger test team.)

      • invalidname 7 hours ago

        You're already using IntelliJ just use tracepoints and get a ton of advantages without forgetting prints in production. Stop living in the 70s, that quote makes sense when you're building a kernel not a modern user space app.

        • theapache64 6 hours ago

          I appreciate your feedback :) and I understand what you mean.

          Let me give a glimpse of the environment I work in. The project I work on is an Android project, which uses Jetpack Compose, a UI library developed by Google, and it's super slow in debug mode. Putting the IDE's debugger on top of it slows down the app to an unusable degree. Also, the already hot CPU and crunching RAM get even hotter.

          In this scenario, print debugging gives me much pace, and it works for me.

          Plus, as mentioned in the blog post, the blog post is not fully about using Live Templates for printing class names and function names or adding timestamps easily. Rather, the post is more about using a tool that fits your needs. My suggestion is to analyze your workflow and find the most repeating and boring code you write every day, and use custom live template for that :)

        • undefined 9 hours ago
          [deleted]