Share via

Dbghelp API fails to find symbol files in downstream store

RLWA32 52,566 Reputation points
2026-03-20T07:34:53.8733333+00:00

Over time the local store that I used for downloaded symbol files had become quite large. I considered using the AgeStore utility to prune it but it balked because file system last access updating was disabled. So I decided to write a utility using the Dbghelp API to find the file system location of the symbol files that correspond to my system's current binaries. With that information I would be able to delete all other old and irrelevant symbol files that uselessly consumed disk space. I had experimented with this API in the past and knew that the SymFindFileInPath function was capable of enumerating the symbol store using a callback function that compared symbol information from a binary to the corresponding information from the enumerated symbol files. This comparison would enable me to achieve my objective.

However, SymFindFileInPath consistently failed to enumerate any symbol files in the local store, returning a file not found error. Consequently, the callback function was not executed. Apparently, the issue is caused by downloaded symbol files being stored in a sub-folder of the local store that is not searched by symsrv.dll.

I have reported this on the developer community site at https://developercommunity.visualstudio.com/t/Dbghelp-API-fails-to-find-symbol-files-i/11062806

Windows development | Windows API - Win32

2 answers

Sort by: Most helpful
  1. RLWA32 52,566 Reputation points
    2026-04-29T08:05:36.73+00:00

    Well, the issue I posted to the developer community site was closed with an "Other Product" classification. It was deemed to be a Windows issue.

    I took exception to this resolution and posted a comment to the site pointing it to the March 26 comment from @Gary Nebbett that documented "Visual Studio uses symsrv.dll to download the symbol files and an ETW trace shows that win32u.pdb is actually downloaded to the _NT_SYMBOL_PATH cache (if not already present) and then moved to the Visual Studio cache - denuding the NT_SYMBOL_PATH cache of that symbol file."

    Now waiting for Microsoft's response.

    Was this answer helpful?

    0 comments No comments

  2. Taki Ly (WICLOUD CORPORATION) 1,500 Reputation points Microsoft External Staff Moderator
    2026-03-25T11:08:40.5533333+00:00

    Hello @RLWA32 ,

    The workaround everyone discussed and arrived at is likely the only practical option that works right now (i.e., using a file.ptr redirect so WinDbg/DbgHelp can resolve the PDB that Visual Studio placed under the stripped folder).

    If we want to understand the root cause in more detail, I’d need to know exactly what changed between Visual Studio versions regarding symbol download/cache behavior. At the moment I don’t have access to that internal change history, so if I get any newer information, I’ll let you all know as soon as I can.

    For additional context, I checked the internal ticket on Developer Community, and it is being assigned to the responsible team.

    I hope your issue will be answered/resolved soon. Thanks everyone for troubleshooting this issue.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.