@@ -34,9 +34,12 @@ async function getVsCodeLaunchConfig(lldConfig?: LldConfig) {
3434
3535 const moduleDirname = getModuleDirname ( ) ;
3636 //Logger.log("Module folder", moduleDirname);
37- const currentFolder = path . resolve ( ) ;
37+ const projectDirname = getProjectDirname ( ) ;
38+
3839 //Logger.log("Current folder", currentFolder);
39- const localFolder = path . join ( currentFolder , "node_modules/.bin/lld" ) ;
40+ const localFolder = path . resolve (
41+ path . join ( projectDirname , "node_modules/.bin/lld" )
42+ ) ;
4043
4144 let runtimeExecutableSet = false ;
4245
@@ -45,7 +48,10 @@ async function getVsCodeLaunchConfig(lldConfig?: LldConfig) {
4548 Logger . verbose ( "Lambda Live Debugger is installed locally" ) ;
4649 // check if file exists
4750 try {
48- //Logger.log("Checking local folder", localFolder);
51+ Logger . log (
52+ "Checking local folder for runtimeExecutable setting for VsCode configuration" ,
53+ localFolder
54+ ) ;
4955 await fs . access ( localFolder , fs . constants . F_OK ) ;
5056 config . configurations ! [ 0 ] . runtimeExecutable = localRuntimeExecutable ;
5157 runtimeExecutableSet = true ;
@@ -61,6 +67,7 @@ async function getVsCodeLaunchConfig(lldConfig?: LldConfig) {
6167 Logger . verbose (
6268 `Setting absolute path for runtimeExecutable setting for VsCode configuration`
6369 ) ;
70+ const localFolderSubfolder = path . resolve ( "node_modules/.bin/lld" ) ;
6471 const globalModule1 = path . join ( moduleDirname , ".." , ".." , ".bin/lld" ) ;
6572 const globalModule2 = path . join ( moduleDirname , ".." , ".." , "bin/lld" ) ;
6673 const globalModule3 = path . join (
@@ -73,6 +80,7 @@ async function getVsCodeLaunchConfig(lldConfig?: LldConfig) {
7380 ) ;
7481 const possibleFolders = {
7582 [ localFolder ] : "${workspaceFolder}/node_modules/.bin/lld" ,
83+ [ localFolderSubfolder ] : localFolderSubfolder ,
7684 [ globalModule1 ] : globalModule1 ,
7785 [ globalModule2 ] : globalModule2 ,
7886 [ globalModule3 ] : globalModule3 ,
0 commit comments