Dapr Visual Studio Code extension overview

    Dapr offers a preview Dapr Visual Studio Code extension for local development which enables users a variety of features related to better managing their Dapr applications and debugging of your Dapr applications for all supported Dapr languages which are .NET, Go, PHP, Python and Java.

    The Dapr extension helps you debug your applications with Dapr using Visual Studio Code’s built-in debugging capability.

    Using the operation, you can update your existing task.json and launch.json files to launch and configure the Dapr sidecar when you begin debugging.

    1. Make sure you have a launch configuration set for your app. (Learn more)
    2. Open the Command Palette with Ctrl+Shift+P
    3. Run your app and the Dapr sidecar with F5 or via the Run view.

    Scaffold Dapr components

    To create a dedicated components folder with the default statestore, , and zipkin components, use the Dapr: Scaffold Dapr Components Command Palette operation.

    1. Open your application directory in Visual Studio Code
    2. Open the Command Palette with Ctrl+Shift+P
    3. Select
    4. Run your application with dapr run --components-path ./components -- ...

    The Applications view shows Dapr applications running locally on your machine.

    Invoke Dapr applications

    Within the Applications view, users can right-click and invoke Dapr apps via GET or POST methods, optionally specifying a payload.

    Within the Applications view, users can right-click and publish messages to a running Dapr application, specifying the topic and payload.

    Users can also publish messages to all running applications.

    Screenshot of the Dapr VSCode extension publish option

    Additional resources

    Debugging multiple Dapr applications at the same time

    Using the VS Code extension, you can debug multiple Dapr applications at the same time with Multi-target debugging.