diff --git a/package.json b/package.json index f8061b5..c7e7ffb 100644 --- a/package.json +++ b/package.json @@ -103,6 +103,10 @@ "description": "Stop the docker build on the first instruction.", "default": false }, + "builder": { + "type": "string", + "description": "Builder to use." + }, "args": { "type": "array", "description": "Arguments to pass to the build." diff --git a/src/dap/config.ts b/src/dap/config.ts index dd4baac..373bfb2 100644 --- a/src/dap/config.ts +++ b/src/dap/config.ts @@ -10,7 +10,11 @@ class DebugAdapterExecutableFactory createDebugAdapterDescriptor( session: vscode.DebugSession, ): vscode.ProviderResult { - var args = ['buildx', 'dap', 'build']; + var args = ['buildx']; + if (session.configuration?.builder) { + args = args.concat(['--builder', session.configuration?.builder]); + } + args = args.concat(['dap', 'build']); if (session.configuration?.args) { args = args.concat(session.configuration?.args); }