microsoft / vscode-dapr

A Visual Studio Code extension for Dapr development
Other
58 stars 18 forks source link

Can't debug multi-run dapr solution (The task dapr cannot be tracked) #319

Open jasonshave opened 8 months ago

jasonshave commented 8 months ago

Overview:

I'm able to run my dapr solution which has 3 ASP.NET 8 web API's using the dapr -f multi-run file but having some difficulty getting the debug experience to work.

Actual behavior:

When using the CTRL+SHIFT+P to scaffold a launch.json and task for tasks.json, it creates the following:

{
  "name": "Launch Dapr",
  "request": "launch",
  "type": "dapr",
  "runFile": "${workspaceFolder}/dapr.yaml",
  "preLaunchTask": "dapr"
}
{
  "label": "dapr",
  "type": "dapr",
  "runFile": "$(workspaceFolder)/dapr.yaml"
},
  1. The first issue is that the runFile's value results in a file not found. If I remove the $(workspaceFolder) and just use dapr.yaml, the project starts up with the right components and sidecar/etc.
  2. Once the solution is started, I get this error:

image

If I click DebugAnyway, I get:

image

  1. If I use the dapr extension to locate the running apps and click on any of the debug buttons I get:

image

Expected behavior:

I should be able to attach and debug with breakpoints in each independent application.

joshfreitas1984 commented 8 months ago

First up your tasks are wrong you can just do: { "label": "dapr", "type": "dapr", "runFile": "./dapr.yaml" }

Was getting the same error about fastlist so I downloaded it chucked it in the \vendor but then it never finds the process - I'm guessing somethings busted.

Is this extension abandoned?

karpikpl commented 6 months ago

same issue happening for me. that "runFile": "$(workspaceFolder)/dapr.yaml" is actually how DAPR extension scaffolds the project

joshfreitas1984 commented 6 months ago

Anyone that finds this - pretty sure the plugin is abandoned. However, .NET Aspire is your friend! The f5 experience on the Apphost is amazing it will load up all your hosts and attach the debuggers super fast.

philliphoff commented 3 months ago

@joshfreitas1984 @karpikpl Abandoned, no. One item in an ever-increasing set of responsibilities with constantly shifting priorities, perhaps. :-) I'm working on a PR to resolve some of these task scaffolding issues.