CLion Debugging – Beyond the Basics – Part 1: Suspended
Back in October of last year I wrote "CLion Debugging – Part 1: Fundamentals", to introduce the everyday debugging features in CLion. It was "Part 1", because the promise was that I would follow up with a "Part 2", covering more advanced features. One thing you should never do is call something "Part 1" before you’ve written later parts!
Part 2 has been a long time coming not just because it was bigger than expected, but so much bigger that I am, in turn, splitting it into three parts! Therefore I’ve rebased on "Beyond the Basics – Part 1", and this part covers what you can do while you are suspended at a breakpoint, including some things you can do with expression evaluation that you may not have come across.
We’ll look at setting, muting and inspecting variables, evaluating expressions, adding watches, interactive inline hints (which was added since the previous video), hex and memory views, and the peripherals view for embedded devices.
Here are all the shortcuts used in the video:
|Jump To Source
I’ll follow up with Parts 2 and 3 (which have been written). Part 2 will cover ways of suspending (break points and watch points) – including how you might not want to suspend at all – and moving the execution pointer. Then Part 3 will go beyond the immediate process to cover attaching to other (local) processes, debugging remote processes, debugging as root and debugging core dumps. It will also look at dropping to a GDB or LLDB terminal, as well as useing .gdbinit or .lldbinit to run debugger commands at the start of every session. Stay tuned!
Update (March 29, 2021): CLion Debugging – Beyond the Basics – Part 2: Dynamic
Subscribe to Blog updates
AI Assistant Insights: Writing C++ Code With the Power of AI in CLion!
AI Assistant in CLion can generate whole code snippets for you. It uses the project context to create relevant function calls and C++ statements.
Striving For Better C++ Code, Part II: Function Summaries to Speed Up the Data Flow Analysis
This is the second blog post in the series dedicated to Data Flow Analysis (DFA) and its implementation in CLion. Read the first part here: Striving For Better C++ Code, Part I: Data Flow Analysis Basics Striving For Better C++ Code, Part II: Function Summaries to Speed Up the Data Flow Analysi…
Striving For Better C++ Code, Part I: Data Flow Analysis Basics
CLion comes with a built-in data flow analyzer, which runs constantly when you are writing your code and helps improve your code’s quality. It can reveal various code problems that might later lead to runtime issues, security breaches, and other vulnerabilities. Examples of these useful checks are c…