I am working on code (legacy code) which uses Apache Xerces-C library. I am trying to view the value of DOMString (and other related DOM objects) in Microsoft Visual Studio Debugger but in vain. I have tried the following
1) I Added the following in the autoexp.dat file:
;------------------------------------------------------------------------------ ;Xerces DOMString=<fHandle->fDSData->fData,su> ;------------------------------------------------------------------------------
Result: Same behavior, it shows the memory location
2) I tried to quick watch the DOMString variable using ‘var,su‘ syntax
Result: ''
I have asked this question at the Apache Xerces General mailing list.
In case someone encountered this problem and had a workaround, it would be of great help to me.
After looking at the Xerces library code and it’s usage in my code base (we included only headers), I figured out that there was a preprocessor directive (XML_DEBUG) for debugging.
You have to build your project (which is using Xerces project/libaray) by adding this preprocessor directive if not added already.
In visual studio right click on project -> properties -> C/C++ -> Preprocessor and then add XML_DEBUG in Preprocessor Definitions
Along with this you need to edit autoexp.dat file as mentioned in the post above.
Hope this helps.