A core feature of Visual Studio that allows developers to inspect, analyze, and troubleshoot code during execution.
In Visual Studio 2026, debugging an extension still relies on the same core mechanisms: the experimental instance, correct build configuration (Debug), and correct symbol (.pdb) and source loading. The behavior described—symbols loading from the Release output—indicates that the debugger is attaching to a different DLL than the one built by the active Debug configuration, or that symbol search paths are resolving to the Release build first.
Use the following steps to force the debugger to load the correct Debug symbols and DLL for the extension.
- Start debugging the extension in the experimental instance
- Open the extension project.
- Set a breakpoint in the extension code (for example, in the
InitializeServicesmethod of the mainExtension-derived class). - Start debugging with Debug > Start Debugging (F5). This launches the Visual Studio Experimental Instance where the extension is loaded.
- Perform the actions in the experimental instance that activate the extension so the module is actually loaded.
- Verify and correct symbol loading while debugging
- In the main (debugger) Visual Studio instance, open the Modules window:
- Debug > Windows > Modules (or
Ctrl+Alt+U).
- Debug > Windows > Modules (or
- Locate the module (DLL) for the extension in the list.
- Check the Path column to confirm whether the loaded DLL is coming from the Debug or Release output folder.
- Check the Symbol Status and Symbol File columns to see which
.pdbis loaded. - Right‑click the module and use:
- Symbol Load Information to see exactly where the debugger searched for symbols and which
.pdbit loaded. - Load Symbols to force reloading from the configured symbol locations.
- If the wrong
.pdbis loaded, use Load Symbols and then browse to the Debug output folder for the extension and select the correct.pdb. - After loading the correct
.pdb, right‑click again and choose Always Load Automatically so future sessions use this symbol file automatically.
- Symbol Load Information to see exactly where the debugger searched for symbols and which
- Fix symbol search paths so Debug is preferred
- Open Tools > Options.
- Go to All Settings > Debugging > Symbols.
- Under Symbol file (.pdb) locations:
- Remove or disable any paths that point to Release output folders for the extension.
- Add the Debug output folder of the extension project (for example, the
bin\Debugpath) as a symbol location. - Ensure the Debug folder entry is higher in the list than any Release or shared symbol locations so it is searched first.
- Select Save.
- Confirm source file search paths If the debugger still does not step into the expected source files, ensure the source search paths are correct:
- In Solution Explorer, select the solution and open Properties (Alt+Enter).
- Go to Debug Source Files.
- Under Directories containing source code, add the extension project’s source directory if it is not already listed.
- Ensure only the intended source directories are listed and that no Release-only paths are masking the Debug sources.
- Select OK or Apply.
- Use the No Symbols Loaded page when hitting breakpoints If the debugger breaks into code and shows a No Symbols Loaded page for the extension module:
- Use the options on that page to:
- Select New Path and add the Debug output folder for the extension, then select Load.
- Or select Browse and find <executable-name> and manually choose the correct
.pdbin the Debug folder.
- After the correct
.pdbis found and loaded, the debugger will use the matching Debug symbols and source.
- Ensure the project is actually building Debug for the experimental instance
- Confirm the active configuration is Debug (not Release) in the toolbar when starting F5.
- Rebuild the solution in Debug before starting the experimental instance.
- If multiple configurations or output paths are defined in the project file, verify that the experimental instance is loading the DLL from the Debug output path (as seen in the Modules window). If it is loading from a Release path, adjust the project’s build output or VSIX packaging so the VSIX used by the experimental instance contains the Debug build.
Following these steps ensures that the experimental instance loads the Debug build of the extension and that the debugger resolves symbols and source from the Debug output, restoring full debugging capabilities.
References: