Problem
extension.ts's resolveServerPath resolves two different paths depending on mode:
- Production (packaged VSIX):
src/VSCode/server/<rid>/ — populated by scripts/publish-server.sh
- Dev mode (Extension Development Host / F5):
src/LSP/Reqnroll.IdeSupport.LSP.Server/bin/Release/net10.0/win-x64/publish/ — populated only by manually running dotnet publish on the server project directly
.vscode/launch.json's preLaunchTask for the "Run Extension" config is npm: compile — TypeScript compile only. Nothing rebuilds or republishes the .NET server before F5 launches the Extension Development Host. Every dev-mode run therefore reuses whatever was last manually published to that bin/Release/.../publish folder, regardless of what's changed in source since.
How this bit us
While verifying #39 (ambiguous-step hover message) in VS Code, the hover still showed the old generic "Ambiguous step definition." message even though the fix was merged into the branch under test. Comparing the wire-level textDocument/publishDiagnostics payload in the LSP inspector log against the fix commit timestamp confirmed the server binary predated the fix by ~2.5 hours — a stale publish, not a code bug. Easy to lose time chasing a phantom regression this way.
Proposed fix
Add a preLaunchTask (or a chained npm script run before compile) to .vscode/launch.json that republishes the LSP server for the current platform before every F5 launch, so the Extension Development Host always reflects current source. Likely reuses (or is closely modeled on) scripts/publish-server.sh, but should be fast enough not to meaningfully slow down the F5 inner loop (e.g. skip if source is unchanged since the last publish, if that's easy to detect cheaply).
Problem
extension.ts'sresolveServerPathresolves two different paths depending on mode:src/VSCode/server/<rid>/— populated byscripts/publish-server.shsrc/LSP/Reqnroll.IdeSupport.LSP.Server/bin/Release/net10.0/win-x64/publish/— populated only by manually runningdotnet publishon the server project directly.vscode/launch.json'spreLaunchTaskfor the "Run Extension" config isnpm: compile— TypeScript compile only. Nothing rebuilds or republishes the .NET server before F5 launches the Extension Development Host. Every dev-mode run therefore reuses whatever was last manually published to thatbin/Release/.../publishfolder, regardless of what's changed in source since.How this bit us
While verifying #39 (ambiguous-step hover message) in VS Code, the hover still showed the old generic "Ambiguous step definition." message even though the fix was merged into the branch under test. Comparing the wire-level
textDocument/publishDiagnosticspayload in the LSP inspector log against the fix commit timestamp confirmed the server binary predated the fix by ~2.5 hours — a stale publish, not a code bug. Easy to lose time chasing a phantom regression this way.Proposed fix
Add a
preLaunchTask(or a chained npm script run beforecompile) to.vscode/launch.jsonthat republishes the LSP server for the current platform before every F5 launch, so the Extension Development Host always reflects current source. Likely reuses (or is closely modeled on)scripts/publish-server.sh, but should be fast enough not to meaningfully slow down the F5 inner loop (e.g. skip if source is unchanged since the last publish, if that's easy to detect cheaply).