Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ All notable changes to the Docker DX extension will be documented in this file.

- introduced a new `cwd` debug configuration attribute so that the working directory used to launch the debug adapter can be set ([#210](https://github.com/docker/vscode-extension/issues/210))
- record the system's version of Buildx in the telemetry ([#218](https://github.com/docker/vscode-extension/issues/218))
- record telemetry when any Buildx debug session is started ([#226](https://github.com/docker/vscode-extension/issues/226))
- Compose
- update schema to the latest version

Expand All @@ -19,7 +20,6 @@ All notable changes to the Docker DX extension will be documented in this file.
### Fixed

- correct the description to state that the `dockerfile` debug attribute has to be relative to the working directory ([#210](https://github.com/docker/vscode-extension/issues/210))

- Bake
- correct the schema for the `output` attribute of the `target` block so that the list can also contain objects instead of only strings ([docker/docker-language-server#77](https://github.com/docker/docker-language-server/issues/77))

Expand Down
1 change: 1 addition & 0 deletions TELEMETRY.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ If you have already opted out of sending telemetry in Visual Studio Code then no
- version of the installed extension
- Docker version
- Buildx version
- number of Buildx debug sessions that are started
- function names and parameters for diagnosing errors and crashes
- error messages when the language server is unable to start or is crashing
- if certain extensions are also installed
Expand Down
14 changes: 13 additions & 1 deletion src/dap/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as vscode from 'vscode';
import { registerCommand } from '../extension';
import { queueTelemetryEvent } from '../telemetry/client';

export const DebugEditorContentsCommandId = 'docker.debug.editorContents';

Expand All @@ -9,6 +9,11 @@ class DebugAdapterExecutableFactory
createDebugAdapterDescriptor(
session: vscode.DebugSession,
): vscode.ProviderResult<vscode.DebugAdapterDescriptor> {
queueTelemetryEvent('client_user_action', false, {
action_id: 'docker.buildx.debug.createDebugAdapterDescriptor',
result: true,
});

var args = ['buildx'];
if (session.configuration?.builder) {
args = args.concat(['--builder', session.configuration?.builder]);
Expand All @@ -34,6 +39,13 @@ class DockerfileConfigurationProvider
_folder: vscode.WorkspaceFolder | undefined,
config: vscode.DebugConfiguration,
): vscode.ProviderResult<vscode.DebugConfiguration> {
// Check if the user is launching as-is without any attributes specified
const result = Object.keys(config).length === 0 ? 'undefined' : 'defined';
queueTelemetryEvent('client_user_action', false, {
action_id: 'docker.buildx.debug.resolveDebugConfiguration',
result: result,
});

// this can happen when debugging without anything in launch.json
if (!config.type && !config.request && !config.name) {
const editor = vscode.window.activeTextEditor;
Expand Down
Loading