I am using the pimpl idiom to hide the implementation details of an interface so that I can have some measure of ABI protection. I'm not that well versed on the ins and outs of MS...using Linux for most of my development career.
I'm unable to view the insides of the pimpl from the debugger inspection window. My types expand only so far as the raw pointer to impl (it uses a smart pointer). I've tried exporting the symbols, but that doesn't seem to work. I suppose the symbols I'm actually trying to view are not being imported or something.
How do I remedy this? Can visualizers call functions perhaps?
Edit -- perhaps I confused people with the export thing.
I'm trying this:
object.h:
struct EXPORT object {
struct EXPORT impl;
impl * pimpl;
};
object.cpp
struct EXPORT object::impl {
char member;
};
The only way I can think to solve the problem is to put the impls in headers that are included in debug versions of the library. Hoping for a better solution.
I could not replicate it with this setup:
CMakeLists.txt
thing.h
thing.cpp
main.cpp
If you don't get it working, I would urge you to provide a similar mcve. I'm not that anal about this, so don't worry. I will still help you.
This worked on visual studio 2017. I placed a breakpoint on return 0 and could see that member had the value of 'a'.
The only thing I can think that might be missing from your setup are the source files for the debugger. Maybe it can load your debugging database, but doesn't actually find the files where you have defined what your private implementation is. Look here for more details on that.