Closed codeprefect closed 1 year ago
You're calling the function eagerly on definition. You need to call it on use
dap.configurations.cs = {
{
name = "Attach to process (DAP)",
processId = function() return require'dap.utils'.pick_process { filter = "AppName" } end,
request = "attach",
type = "coreclr"
},
}
My bad, I had a casing typo in the AppName, hence the error. Thank you.
Debug adapter definition and debug configuration
Debug adapter version
No response
Steps to Reproduce
Start a .NET Core project from the command line Modify the name in the configuration filter to match the app name Start dap and choose "Attach to process (DAP)" Picker shows a list of matching processes (usually 1 if the name is an exact match)
Expected Result
Debugger is attached to running application
Actual Result
Dap fails to attach debugger.
NOTE: The same exact configuration works if the filter is removed.