diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 28fcb2b929c..0dcef3e86f1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -209,13 +209,15 @@ jobs: cd vscode-ext npm install tsc && vsce package -o /tmp/vscode-ext/vscode-ext-linux-aarch64 --target linux-arm64 - - name: Publish linux-xarm64 + - name: Publish linux-arm64 if: github.event_name != 'workflow_dispatch' env: VSCE_PAT: ${{ secrets.VSCE_PAT }} run: cd vscode-ext && vsce publish ${{ steps.version.outputs.version }} --target linux-arm64 - run: rm vscode-ext/libmirrord_layer.so - run: cp /tmp/artifacts/universal-apple-darwin/libmirrord_layer.dylib vscode-ext/ + # Package a patched Delve with our VS Code extension. The patched version bypasses an issue where we can't be injected into platform binaries. + - run: wget https://github.com/metalbear-co/delve/releases/download/1.9.1/delve_darwin_amd64 -O vscode-ext/dlv && chmod +x vscode-ext/dlv # Same binary for darwin - run: | cd vscode-ext @@ -226,10 +228,11 @@ jobs: env: VSCE_PAT: ${{ secrets.VSCE_PAT }} run: cd vscode-ext && vsce publish ${{ steps.version.outputs.version }} --target darwin-x64 + - run: wget https://github.com/metalbear-co/delve/releases/download/1.9.1/delve_darwin_arm64 -O vscode-ext/dlv && chmod +x vscode-ext/dlv - run: | cd vscode-ext npm install - tsc && vsce package -o /tmp/vscode-ext/vscode-ext-darwin-x64 --target darwin-x64 + tsc && vsce package -o /tmp/vscode-ext/vscode-ext-darwin-arm64 --target darwin-arm64 - name: Publish darwin-arm64 if: github.event_name != 'workflow_dispatch' env: diff --git a/CHANGELOG.md b/CHANGELOG.md index bc47cd975e0..2f26036772b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how ### Fixed - using gcloud auth for kubernetes. (mistakenly loaded layer into it) - +- debugging Go on VSCode. We patch to use our own delivered delve. ## 3.7.0 diff --git a/vscode-ext/src/extension.ts b/vscode-ext/src/extension.ts index 90b25ac0a2d..9163c118780 100644 --- a/vscode-ext/src/extension.ts +++ b/vscode-ext/src/extension.ts @@ -249,6 +249,10 @@ class ConfigurationProvider implements vscode.DebugConfigurationProvider { if (config.type === "go") { config.env["MIRRORD_SKIP_PROCESSES"] = "dlv;debugserver;compile;go;asm;cgo;link"; + // use our custom delve to fix being loaded into debugserver + if (os.platform() === "darwin") { + config.dlvToolPath = path.join(globalContext.extensionPath, "dlv"); + } } return resolve(config);