Debugging in the VS Code Extension

Debug a tool while it runs inside the ToolBox VS Code Extension host.

Overview

Local tool debug loader: Desktop only

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

  1. Publish your build (or a pre-release version) following the Publishing Your Tool guide.
  2. In VS Code, open the Power Platform ToolBox view in the Activity Bar.
  3. 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:

  1. Open the Command Palette (Cmd+Shift+P / Ctrl+Shift+P).
  2. Run Developer: Open Webview Developer Tools.
  3. 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 toolboxAPI calls live, and read console.log/console.error output from your tool
  • Network — inspect Dataverse/Power Platform HTTP requests and responses
  • Sources — set breakpoints if your published build includes source maps

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.

Was this page helpful?