Browse Source

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
pull/4023/head
Siegfried Pammer 1 month ago
parent
commit
48b8684646
  1. 21
      .vscode/launch.json

21
.vscode/launch.json vendored

@ -5,20 +5,33 @@
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "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", "type": "coreclr",
"request": "launch", "request": "launch",
"preLaunchTask": "build", "preLaunchTask": "build",
"program": "${workspaceFolder}/ILSpy/bin/Debug/net10.0/ILSpy.exe", "program": "${workspaceFolder}/ILSpy/bin/Debug/net10.0/ILSpy.dll",
"args": ["--newinstance"], "args": ["--newinstance"],
"cwd": "${workspaceFolder}", "cwd": "${workspaceFolder}",
"console": "internalConsole", "console": "internalConsole",
"stopAtEntry": false "stopAtEntry": false
}, },
{ {
"name": ".NET Core Attach", "name": ".NET Core Debugger (attach)",
"type": "coreclr", "type": "coreclr",
"request": "attach" "request": "attach",
"processId": "${command:dotrush.pickProcess}"
} }
] ]
} }
Loading…
Cancel
Save