Clion debugger steps into Core files (.h)

Answered

Hello,

i have a problem with the Clion debugger. On MacOS it works fine but on Linux it is always stepping (F7) into the C++ Core Files like new_allocator.h 

That makes debugging highly unusable.

I found only this (https://youtrack.jetbrains.com/issue/CPP-25247).   answer on google but it didn't help. I wrote the command as suggested into the .gdbinit file.

Does someone has a better idea?

2
4 comments

I am having the same problem on Windows. Anna Falevskaya: Given that this apparently seems to be a 5-year old known issue, can we expect that this is something that will be worked and followed up on? It greatly reduces debugging efficiency (and definitely makes it rather annoying). Thank you.

0

Here is the developer's answer about possible workarounds:

Depending on the debugger you're using (GDB or LLDB), you may fine-tune and instruct it to skip frames belonging to certain files or libraries.

For GDB, use skip file /usr/include/*.h in the debugger console (the GDB tab in the debugger tool window) for one-time setting affecting the current debug session. You can use ~/.gdbinit file to change the setting globally for all you projects, or .gdbinit in your project root to limit its scope. Here's more detailed info on using debugger init files. https://www.jetbrains.com/help/clion/configuring-debugger-options.html#gdbinit-lldbinit

LLDB doesn't seem to have a setting corresponding to GDB's skip file, and only allows to skip certain frames based on their function name: settings set target.process.thread.step-avoid-regexp ^std::.

0

Still having the issue in 2024, I updated the youtrack issue.

0

Please sign in to leave a comment.