Skip to content

Commit 301cc67

Browse files
committed
Fixup debugging in project panel tests
1 parent ffb5840 commit 301cc67

File tree

3 files changed

+4
-26
lines changed

3 files changed

+4
-26
lines changed

assets/test/.vscode/settings.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,5 @@
88
"-DTEST_ARGUMENT_SET_VIA_TEST_BUILD_ARGUMENTS_SETTING"
99
],
1010
"lldb.verboseLogging": true,
11-
"swift.backgroundCompilation": false,
12-
"swift.debugger.useDebugAdapterFromToolchain": false,
13-
"lldb.library": "/usr/lib/liblldb.so",
14-
"lldb.launch.expressions": "native",
15-
"swift.pluginPermissions": {}
11+
"swift.backgroundCompilation": false
1612
}

src/SwiftSnippets.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ export async function debugSnippetWithOptions(
119119
ctx.buildFinished(snippetName, snippetDebugConfig, options);
120120
return result;
121121
});
122-
} catch {
122+
} catch (error) {
123+
ctx.outputChannel.appendLine(`Failed to debug snippet: ${error}`);
123124
// ignore error if task failed to run
124125
return false;
125126
}

test/integration-tests/ui/ProjectPanelProvider.test.ts

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ import {
2626
updateSettings,
2727
} from "../utilities/testutilities";
2828
import contextKeys from "../../../src/contextKeys";
29-
import { SwiftToolchain } from "../../../src/toolchain/toolchain";
30-
import { getLLDBLibPath } from "../../../src/debugger/lldb";
3129

3230
suite("ProjectPanelProvider Test Suite", function () {
3331
let treeProvider: ProjectPanelProvider;
@@ -53,27 +51,10 @@ suite("ProjectPanelProvider Test Suite", function () {
5351
testAssets: ["targets"],
5452
});
5553

56-
async function getLLDBDebugAdapterPath() {
57-
switch (process.platform) {
58-
case "linux":
59-
return "/usr/lib/liblldb.so";
60-
case "win32":
61-
return await (await SwiftToolchain.create()).getLLDBDebugAdapter();
62-
default:
63-
return (await getLLDBLibPath(await SwiftToolchain.create())).success;
64-
}
65-
}
66-
6754
let resetSettings: (() => Promise<void>) | undefined;
6855
beforeEach(async function () {
69-
const lldbPath = {
70-
"lldb.library": await getLLDBDebugAdapterPath(),
71-
"lldb.launch.expressions": "native",
72-
};
73-
7456
resetSettings = await updateSettings({
75-
"swift.debugger.useDebugAdapterFromToolchain": false,
76-
...lldbPath,
57+
"swift.debugger.debugAdapter": "CodeLLDB",
7758
});
7859

7960
await waitForNoRunningTasks();

0 commit comments

Comments
 (0)