Skip to content

dap: Centralise debug launch path resolution #2020

Description

@charlieegan3

Related to #2018 (comment)

When a user starts a debug session, three path values reach OPA's debugger — inputPath,
bundlePaths, dataPaths.

bundlePaths, dataPaths come from the extension:

See also https://github.com/open-policy-agent/vscode-opa/blob/247590dbdca7e024e0f7a0f8ea7a9a8ca7454f59/src/da/activate.ts#L116-L122

inputPath comes from regal

  • responseParams := map[string]any{
    "type": "opa-debug",
    "name": args.Query,
    "request": "launch",
    "command": "eval",
    "query": args.Query,
    "enablePrint": true,
    "stopOnEntry": true,
    "inputPath": inputPath,

Ideally, all would be determined by Regal. This should be doable with the config discovery code we already have.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions