WPP in user mode application - works in release build but not in debug build.

Noticed that WPP tracing in Release build works with the WDK sample SimplePipelineFilter (WdkPipelineFilter) but not with Debug build. Selecting debug version of WdkPipelineFilter.pdb while creating a new traceview.exe log session results in the error “PDB file does not contain provider information”. What’s the deal?

Both the release and debug builds generate identical .tmh files which signifies that WPP was run for both the Debug and Release configurations.

Thanks
JSL

Could the reason be this in trace.hxx in the SimplePipelineFilter sample driver on github ?

//
// For checked builds, send output to debugger rather than to file
//
#ifdef DBG
#define WPP_DEBUG(x) WppTraceDebugOut x
#endif

Try commenting that line out. WPP_DEBUG is checked in the tmh files for both Release and Debug builds.

Same result with these lines completed deleted.

Note that I am using Visual Studio 2019, the code is compiled with the toolset set to WindowsApplicationForDrivers10.0.

Running the debug builds generate properly decoded trace messages with PDB from release build (identical source codof course).

Finally, simply changing the toolset from WindowsApplicationForDrivers10.0 to WindowsApplicationForDrivers8.1 makes everything works fine.

Clearly, it is a VS bug in the PDB generation are.

What compile and link options are you using?

All default as in the git repo. Do you have specific option in mind?

‘All of the defaults in the git repo’ means that I have to go and check. I’m not likely to go to the effort to figure out what those are

what you should look at are the debug symbol options in both the compile and link steps. The code generation options are also of interest.