Skip to content
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
8552bff
Add SVG support for asset generation (#326)
azchohfi Mar 13, 2026
5eb7e4a
(feat) update-assets now generates all recommended variants and light…
nmetulev Mar 18, 2026
e3fa130
fixing skiasharp dll missing (#358)
nmetulev Mar 22, 2026
996e4ff
Bump flatted from 3.3.3 to 3.4.2 in /src/winapp-npm (#356)
dependabot[bot] Mar 22, 2026
de17792
improving how ico files are created during update-assets (#360)
nmetulev Mar 27, 2026
7e8e1f6
Bump picomatch from 4.0.3 to 4.0.4 in /src/winapp-npm (#362)
dependabot[bot] Mar 27, 2026
6a08d75
Bump picomatch in /samples/electron (#361)
dependabot[bot] Mar 27, 2026
4045245
Updating dependencies (#363)
nmetulev Mar 30, 2026
68e988b
Bump picomatch from 2.3.1 to 2.3.2 in /samples/electron-winml (#364)
dependabot[bot] Mar 30, 2026
b2e2d56
Bump version to 0.2.2 for development (#366)
nmetulev Mar 30, 2026
0326a67
Update github copilot plugin location (#368)
nmetulev Mar 31, 2026
e90741c
Minor Rust doc updates (#377)
zateutsch Apr 2, 2026
1357b43
Bump @xmldom/xmldom from 0.8.11 to 0.8.12 in /samples/electron-winml …
dependabot[bot] Apr 2, 2026
6b9c40d
Bump lodash from 4.17.23 to 4.18.1 in /samples/electron (#379)
dependabot[bot] Apr 2, 2026
a4fab5e
Bump @xmldom/xmldom from 0.8.11 to 0.8.12 in /samples/electron (#378)
dependabot[bot] Apr 2, 2026
7e83419
Adds winapp run command. (#341)
azchohfi Apr 2, 2026
759b4d1
Initial plan
Copilot Apr 3, 2026
f456ebf
Fix: show clear error and install prompt when required debugger exten…
Copilot Apr 3, 2026
42d0fc8
Merge alzollin/vsc into feature branch and re-apply extension missing…
Copilot Apr 6, 2026
c3cccd0
Reset branch to alzollin/vsc and cleanly apply debugger extension che…
Copilot Apr 6, 2026
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
46 changes: 46 additions & 0 deletions src/winapp-VSC/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,46 @@ import { glob } from 'glob';

const WINAPP_DEBUG_TYPE = 'winapp';

/**
* Maps debugger types to the VS Code extensions that provide them.
*/
const DEBUGGER_EXTENSION_MAP: Record<string, { id: string; name: string }> = {
'coreclr': { id: 'ms-dotnettools.csharp', name: 'C# (ms-dotnettools.csharp)' },
'cppvsdbg': { id: 'ms-vscode.cpptools', name: 'C/C++ (ms-vscode.cpptools)' },
};

/**
* Check that the VS Code extension required for the given debugger type is installed.
* If it is not installed, show a clear error message with an option to install it.
* Returns true if the extension is present (or the debugger type has no known requirement),
* false if the extension is missing.
*/
async function ensureDebuggerExtensionInstalled(debuggerType: string): Promise<boolean> {
const requirement = DEBUGGER_EXTENSION_MAP[debuggerType];
if (!requirement) {
return true;
}

if (vscode.extensions.getExtension(requirement.id)) {
return true;
}

const install = await vscode.window.showErrorMessage(
`The "${debuggerType}" debugger requires the ${requirement.name} VS Code extension. ` +
`Please install it and reload VS Code, then retry.`,
'Install Extension'
);

if (install === 'Install Extension') {
await vscode.commands.executeCommand('workbench.extensions.installExtension', requirement.id);
vscode.window.showInformationMessage(
`Installing ${requirement.name}. Please reload VS Code once the installation completes, then retry the debug session.`
);
}

return false;
}

/**
* Execute a winapp CLI command and show output in the terminal
*/
Expand Down Expand Up @@ -166,6 +206,12 @@ class WinAppDebugAdapterFactory implements vscode.DebugAdapterDescriptorFactory
// Determine the debugger type based on config or default to coreclr
const debuggerType = config.debuggerType || 'coreclr';

// Verify the required VS Code extension for this debugger type is installed
// before starting the app, so we don't launch the process only to fail on attach.
if (!await ensureDebuggerExtensionInstalled(debuggerType)) {
return new vscode.DebugAdapterInlineImplementation(new NoOpDebugAdapter());
}

let args = config.args || '';
if (debuggerType === 'node') {
args = '--inspect' + (config.port ? `=${config.port}` : '') + ' ' + args;
Expand Down