ReportLiveObjects getting the logs programmatically

347 views Asked by At

I have my app using IDXGIDebug::ReportLiveObjects to report some memory leaks. But I'd like to pipe these logs through my own log system.

I could not find much info online. Anyone knows how I could access these DXGI logs programmatically besides looking at the visual studio output window.

1

There are 1 answers

0
Alex On

As far as I can tell, there isn't a way to do this. ReportLiveObjects likely uses OutputDebugString or DbgPrint under the hood, and these go directly to the process's attached debugger. While some tools do have the ability to tap into these streams, all filtering has to be done by the program capturing the data, meaning you get to deal with not just the output of ReportLiveObjects, but the output of Visual Studio, of any drivers that get loaded and check for a debugger, and quite possibly the system itself. In all honesty, it's probably easier to simply dump the log file to VS's output window, then save the contents of the window as a log file.