Skip to content

Commit cb97b1b

Browse files
committed
Bundle libdbgshim for Linux netcoredbg
1 parent 656ab1f commit cb97b1b

4 files changed

Lines changed: 29 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ All notable changes to this project will be documented in this file.
1111
- _None yet._
1212

1313
### Fixed
14-
- _None yet._
14+
- Linux/WSL debugger bundling now ensures `libdbgshim.so` is included with netcoredbg.
1515

1616
### Known issues
1717
- _None yet._

src/extension/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ All notable changes to this project will be documented in this file.
1111
- _None yet._
1212

1313
### Fixed
14-
- _None yet._
14+
- Linux/WSL debugger bundling now ensures `libdbgshim.so` is included with netcoredbg.
1515

1616
### Known issues
1717
- _None yet._

src/extension/scripts/copy-debugger.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ const targetAsset = assets.targets?.[targetPlatform];
5555
const configuredDebuggerPath = resolveConfiguredPath(process.env.NETCOREDBG_PATH);
5656
const configuredLicensePath = resolveConfiguredPath(process.env.NETCOREDBG_LICENSE);
5757
const defaultExeName = targetPlatform.startsWith('win32') ? 'netcoredbg.exe' : 'netcoredbg';
58+
const requiredCompanion =
59+
targetPlatform.startsWith('linux') ? 'libdbgshim.so'
60+
: targetPlatform.startsWith('darwin') ? 'libdbgshim.dylib'
61+
: '';
5862
const targetDir = path.join(extensionRoot, '.debugger');
5963
const targetExe = path.join(targetDir, defaultExeName);
6064
const targetLicense = path.join(targetDir, 'LICENSE.netcoredbg');
@@ -87,6 +91,13 @@ const findNetcoredbg = (root, exeName) => {
8791
return '';
8892
};
8993

94+
const hasRequiredCompanion = (root) => {
95+
if (!requiredCompanion) {
96+
return true;
97+
}
98+
return fs.existsSync(path.join(root, requiredCompanion));
99+
};
100+
90101
const downloadFile = (url, destination) =>
91102
new Promise((resolve, reject) => {
92103
const request = (currentUrl) => {
@@ -139,7 +150,13 @@ const resolveSourceExe = async () => {
139150

140151
const localCandidate = path.join(sourceDir, defaultExeName);
141152
if (fs.existsSync(localCandidate)) {
142-
return localCandidate;
153+
if (!hasRequiredCompanion(path.dirname(localCandidate))) {
154+
console.warn(
155+
`Local netcoredbg at ${localCandidate} is missing ${requiredCompanion}; downloading target asset instead.`
156+
);
157+
} else {
158+
return localCandidate;
159+
}
143160
}
144161

145162
if (!targetAsset?.url) {

test-explore/TEST_RESULTS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ Optional flags:
5252
Command:
5353
- `wsl -d Ubuntu -- bash -lc "cd /mnt/c/Work/vbnet-lsp/test-explore/clients/vscode && npm test"`
5454

55+
Outcome: PASS (14 passing, 5 pending; non-fatal DAP warnings)
56+
Notes:
57+
- DAP trace: `test-explore/clients/vscode/logs/dap-trace-2026-01-23T175654395Z.log`.
58+
59+
### 2026-01-23 — VS Code harness (WSL Ubuntu, Linux)
60+
61+
Command:
62+
- `wsl -d Ubuntu -- bash -lc "cd /mnt/c/Work/vbnet-lsp/test-explore/clients/vscode && npm test"`
63+
5564
Outcome: FAIL (11 passing, 5 pending, 3 failing)
5665
Notes:
5766
- Debug suite failed to launch netcoredbg; LSP smoke passed.

0 commit comments

Comments
 (0)