[Lldb-commits] [lldb] [vscode-lldb] Add VS Code commands for high level debug workflow (PR #151827)

John Harrison via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 6 12:25:46 PDT 2025


ashgti wrote:

You may not need these to be extra commands.

If you register a debug configuration resolve you can have the provider change the type of the debug configuration during resolution. 

```
// example changing configuration type
vscode.registerDebugConfigurationProvider('my-type', {
  resolveDebugConfiguration(folder, debugConfig) {
    return {type: 'lldb-dap', debugConfig... }; // any additional customizations needed.
  }
});

// example extending the resolved configuration
vscode.registerDebugConfigurationProvider('lldb-dap', {
  resolveDebugConfiguration(folder, debugConfig) {
    return { initCommands: [...], ...debugConfig };
  }
});
```

Additionally, multiple debug configuration providers can be registered for the same debug configuration type. This allows extensions to chain together by default. They are called in the order they are registered, so your extension would need to depend on the lldb-dap extension to ensure it runs after the lldb-dap extension or you can register your extension using the `*` type and it will always run last in the resolution chain.

https://github.com/llvm/llvm-project/pull/151827


More information about the lldb-commits mailing list