From 48b8684646972adce571077d94d03a4d467b7e0b Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Mon, 17 Aug 2026 09:35:25 +0200 Subject: [PATCH] Launch ILSpy from VS Code via dotrush, with a plain fallback dotrush resolves the active target and owns the build task, so the launch and attach configurations go through its commands. Those commands only exist when the extension is installed, so a third configuration builds and launches the apphost directly for setups without it. Assisted-by: Claude:claude-opus-5[1m]:Claude Code --- .vscode/launch.json | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index c717d85f5..2e007fc34 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,20 +5,33 @@ "version": "0.2.0", "configurations": [ { - "name": "ILSpy", + "name": ".NET Core Debugger (launch)", + "type": "coreclr", + "request": "launch", + "program": "${command:dotrush.activeTargetPath}", + // ILSpy is single-instance: without this a launch forwards its arguments to an + // already-running ILSpy and exits before Avalonia starts, so no breakpoint is hit. + "args": ["--newinstance"], + "preLaunchTask": "dotrush: Build" + }, + { + // Fallback for setups without the dotrush extension: builds and launches ILSpy + // directly, no ${command:dotrush.*} resolution involved. + "name": "ILSpy (no dotrush)", "type": "coreclr", "request": "launch", "preLaunchTask": "build", - "program": "${workspaceFolder}/ILSpy/bin/Debug/net10.0/ILSpy.exe", + "program": "${workspaceFolder}/ILSpy/bin/Debug/net10.0/ILSpy.dll", "args": ["--newinstance"], "cwd": "${workspaceFolder}", "console": "internalConsole", "stopAtEntry": false }, { - "name": ".NET Core Attach", + "name": ".NET Core Debugger (attach)", "type": "coreclr", - "request": "attach" + "request": "attach", + "processId": "${command:dotrush.pickProcess}" } ] } \ No newline at end of file