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?
Please sign in to leave a comment.
Hello!
I'm afraid there is no workaround currently.
Feel free to comment or upvote https://youtrack.jetbrains.com/issue/CPP-8441. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.
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.
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-lldbinitLLDB 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::
.Still having the issue in 2024, I updated the youtrack issue.