@@ -6,6 +6,7 @@ import * as fs from "node:fs/promises";
66import { ConfigureButton , OpenSettingsButton } from "./ui/show-error-message" ;
77import { ErrorWithNotification } from "./ui/error-with-notification" ;
88import { LogFilePathProvider , LogType } from "./logging" ;
9+ import { expandUser } from "./utils" ;
910
1011const exec = util . promisify ( child_process . execFile ) ;
1112
@@ -116,8 +117,9 @@ async function getDAPExecutable(
116117 configuration : vscode . DebugConfiguration ,
117118) : Promise < string > {
118119 // Check if the executable was provided in the launch configuration.
119- const launchConfigPath = configuration [ "debugAdapterExecutable" ] ;
120+ let launchConfigPath = configuration [ "debugAdapterExecutable" ] ;
120121 if ( typeof launchConfigPath === "string" && launchConfigPath . length !== 0 ) {
122+ launchConfigPath = expandUser ( launchConfigPath ) ;
121123 if ( ! ( await isExecutable ( launchConfigPath ) ) ) {
122124 throw new ErrorWithNotification (
123125 `Debug adapter path "${ launchConfigPath } " is not a valid file. The path comes from your launch configuration.` ,
@@ -129,7 +131,7 @@ async function getDAPExecutable(
129131
130132 // Check if the executable was provided in the extension's configuration.
131133 const config = vscode . workspace . getConfiguration ( "lldb-dap" , workspaceFolder ) ;
132- const configPath = config . get < string > ( "executable-path" ) ;
134+ const configPath = expandUser ( config . get < string > ( "executable-path" ) ?? " ") ;
133135 if ( configPath && configPath . length !== 0 ) {
134136 if ( ! ( await isExecutable ( configPath ) ) ) {
135137 throw new ErrorWithNotification (
0 commit comments