@@ -42,6 +42,7 @@ async function getVsCodeLaunchConfig(lldConfig?: LldConfig) {
4242
4343 //if installed locally
4444 if ( moduleDirname . startsWith ( "/home/" ) ) {
45+ Logger . verbose ( "Lambda Live Debugger is installed locally" ) ;
4546 // check if file exists
4647 try {
4748 //Logger.log("Checking local folder", localFolder);
@@ -52,12 +53,16 @@ async function getVsCodeLaunchConfig(lldConfig?: LldConfig) {
5253 } catch ( err ) {
5354 //Logger.log("Not found", localFolder);
5455 }
56+ } else {
57+ Logger . verbose ( "Lambda Live Debugger is installed globally" ) ;
5558 }
5659
57- if ( runtimeExecutableSet ) {
58- const projectDirname = getProjectDirname ( ) ;
59- const globalModule1 = path . join ( projectDirname , ".." , ".." , ".bin/lld" ) ;
60- const globalModule2 = path . join ( projectDirname , ".." , ".." , "bin/lld" ) ;
60+ if ( ! runtimeExecutableSet ) {
61+ Logger . verbose (
62+ `Setting absolute path for runtimeExecutable setting for VsCode configuration`
63+ ) ;
64+ const globalModule1 = path . join ( moduleDirname , ".." , ".." , ".bin/lld" ) ;
65+ const globalModule2 = path . join ( moduleDirname , ".." , ".." , "bin/lld" ) ;
6166 const globalModule3 = path . join (
6267 moduleDirname ,
6368 ".." ,
@@ -73,17 +78,22 @@ async function getVsCodeLaunchConfig(lldConfig?: LldConfig) {
7378 [ globalModule3 ] : globalModule3 ,
7479 } ;
7580
81+ Logger . verbose (
82+ `Checking the following possible folders for lld executable:` ,
83+ JSON . stringify ( possibleFolders , null , 2 )
84+ ) ;
85+
7686 // check each possible folder and set the runtimeExecutable
7787 for ( const folder in possibleFolders ) {
7888 try {
7989 //Logger.log("Checking folder", folder);
8090 await fs . access ( folder , fs . constants . F_OK ) ;
8191 config . configurations ! [ 0 ] . runtimeExecutable = possibleFolders [ folder ] ;
8292 runtimeExecutableSet = true ;
83- // Logger.log(" Found folder", folder);
93+ Logger . verbose ( ` Found folder with lld executable: ${ folder } ` ) ;
8494 break ;
8595 } catch ( err ) {
86- //Logger.log(" Not found", folder);
96+ // Not found
8797 }
8898 }
8999
0 commit comments