Skip to content

Latest commit

 

History

History
54 lines (35 loc) · 2.9 KB

debug-with-symbols-windbg.md

File metadata and controls

54 lines (35 loc) · 2.9 KB
title description ms.assetid ms.service ms.topic ms.date monikerRange
Debug with symbols in WinDbg
Use WinDbg to consume symbols and debug your application
C8C003EA-79C8-49EF-BEBD-35548505F0CF
azure-devops-artifacts
conceptual
09/26/2023
<= azure-devops

Debug with WinDbg

[!INCLUDE version-lt-eq-azure-devops]

Azure Artifacts provides a dedicated symbols server for publishing symbols. This server allows you to connect a debugger that can automatically fetch the correct symbol files, enabling you to debug your application efficiently. With tools like WinDbg, you can load an executable, attach the debugger to a running process, consume your symbols, set up breakpoints, and systematically analyze your code.

Add symbol server to WinDbg

To use the Azure Artifacts symbol server, you must add your organization to the symbols search path, but before we can do that, we must first create a personal access token.

  1. Create a Personal Access Token with Symbols (read) scope and copy it to your clipboard.

  2. Open WinDbg, or install it if you haven't already.

  3. Select File, and then select OpenExecutable to load the executable you wish to debug.

  4. Run the following command to set the symbols path. Replace the placeholder with your specific organization name:

    .sympath+ https://artifacts.dev.azure.com/<ORGANIZATION_NAME>/_apis/symbol/symsrv
  5. Set a breakpoint by running the bp command. this will trigger a symbols request.

  6. During the authentication prompt, insert the personal access token you generated earlier. You can leave the username field empty. WinDbg will proceed to obtain the symbols for your executable.

  7. To verify if your symbols are loaded, run the lm command to list all loaded modules.

Start debugging

WinDbg enhances the scope and versatility of debugging, enabling effective troubleshooting of components in both user-mode and kernel-mode:

Related articles