CLion is unable to step into MFC source files in Debug mode (works in Visual Studio)

I am porting a Visual Studio project based on the MFC framework over to CMake and CLion. My issue is that whenever I try to “step into” a function that is defined in the MFC library, the IDE simply steps over it. If I "force-step into" the function, Rider opens the disassembly view pointing to a jump instruction. If I step into again, then it finally takes me to the function's body, but still in the Disassembly view, and not the function's source code.

At this point CLion prompts me to manually select the source file, and after doing so, it finally lets me start stepping through the actual C++ source code of MFC, but having to do this manually every time I want to debug and MFC function is very annoying. See screenshot blow, with CLion's error message on the blue bar at the top.

Stepping into MFC-provided functions should be possible, and it works perfectly fine on Visual Studio 2022 because the library's full source code and debugging symbols are included in the Windows SDK.

I have Microsoft's symbol servers enabled in the CLion debugger settings, so I don't understand why this isn't working as expected.

0

Please sign in to leave a comment.