Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Unable to find task after rebuilding dev container #320

Description

@chris780

I'm new to Dapr but thanks to the great instructions here, I was able to launch and debug a simple application within my dev container.

However, after rebuilding the dev container, I get the following error when trying to run the app:
image

Re-running the Dapr: Scaffold Dapr Tasks command in VS Code and then reverting the changes it makes to launch.json and tasks.json fixes the issue - that is until the next dev container rebuild.

I have a single launch target set up in launch.json:

{
            "name": "Run User Poller",
            "type": "go",
            "request": "launch",
            "mode": "debug",
            "program": "${workspaceFolder}/cmd/user-poller/main.go",
            "args": [
                "-config=configuration/local.yaml"
            ],
            "console": "integratedTerminal",
            "env": {
                "DAPR_HTTP_PORT": "3502",
                "DAPR_GRPC_PORT": "50002"
            },
            "preLaunchTask": "dapr-debug",
            "postDebugTask": "daprd-down"
        },

My entire tasks.json is as follows:

{
    "version": "2.0.0",
    "tasks": [
        {
            "appId": "app",
            "appPort": 8080,
            "httpPort": 3502,
            "grpcPort": 50002,          
            "label": "dapr-debug",
            "type": "dapr"
        },
        {
            "appId": "app",
            "label": "daprd-down",
            "type": "daprd-down"
        }
    ]
}

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions