Debugging in the VS Code Extension
Debug a tool while it runs inside the ToolBox VS Code Extension host.
Overview
The VS Code Extension hosts tools the same way the Desktop App does — in a sandboxed webview, driven by the same toolboxAPI surface. The one difference is how you get your tool's code in front of you: the Desktop App can load an unpublished local build directly, while the VS Code Extension always runs a published copy of your tool installed from the marketplace. For most bug reports and pre-release verification, that's exactly what you want to debug against — the same build your users will run.
Install Your Tool
- Publish your build (or a pre-release version) following the Publishing Your Tool guide.
- In VS Code, open the Power Platform ToolBox view in the Activity Bar.
- Install or update the tool from Marketplace, then select it under Installed Tools and click Launch.
Open Webview Developer Tools
Each tool renders in its own VS Code webview. To inspect it:
- Open the Command Palette (
Cmd+Shift+P/Ctrl+Shift+P). - Run Developer: Open Webview Developer Tools.
- Select your tool's webview if prompted — VS Code opens a Chromium DevTools window attached to it.
Debug with DevTools
The same DevTools panels you'd use in the Desktop App are available here:
- Console — run
toolboxAPIcalls live, and readconsole.log/console.erroroutput from your tool - Network — inspect Dataverse/Power Platform HTTP requests and responses
- Sources — set breakpoints if your published build includes source maps
Source maps only help here if you publish your tool with sourcemap: true in your build config. Consider publishing a -beta/pre-release version with source maps enabled while you're actively debugging, and disabling them for your final stable release.
Iterating on a Fix
Because the VS Code host always runs a published build, the fastest inner loop for writing and testing a fix is still the Desktop App debugging workflow, which loads your unpublished local build directly. Once your fix works there, publish a new version (or pre-release) and reinstall it in VS Code to confirm it behaves the same way in that host.