Skip to content

Commit 3b2c9cf

Browse files
committed
Trace env vars
1 parent 257e5ae commit 3b2c9cf

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/extension.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function findManualExecutable(logger: Logger, uri: Uri, folder?: WorkspaceFolder
108108
if (!executableExists(exePath)) {
109109
let msg = `serverExecutablePath is set to ${exePath}`;
110110
if (directoryExists(exePath)) {
111-
msg += ' but it is a directory and the config option should point to the executable full path';
111+
msg += ' but it is a directory and the config option should point to the executable file full path';
112112
} else {
113113
msg += " but it doesn't exist and it is not on the PATH";
114114
}
@@ -121,6 +121,7 @@ function findManualExecutable(logger: Logger, uri: Uri, folder?: WorkspaceFolder
121121
function findLocalServer(context: ExtensionContext, logger: Logger, uri: Uri, folder?: WorkspaceFolder): string | null {
122122
const exes: string[] = ['haskell-language-server-wrapper', 'haskell-language-server'];
123123
logger.info(`Searching for server executables ${exes.join(',')} in $PATH`);
124+
logger.info(`$PATH environment variable: ${process.env.PATH}`);
124125
for (const exe of exes) {
125126
if (executableExists(exe)) {
126127
logger.info(`Found server executable in $PATH: ${exe}`);
@@ -169,6 +170,11 @@ async function activateServerForFolder(context: ExtensionContext, uri: Uri, fold
169170

170171
const logger: Logger = new ExtensionLogger('client', clientLogLevel, outputChannel);
171172

173+
logger.info('Environment variables:');
174+
Object.entries(process.env).forEach(([key, value]: [string, string | undefined]) => {
175+
logger.info(` ${key}: ${value}`);
176+
});
177+
172178
let serverExecutable;
173179
try {
174180
// Try and find local installations first

0 commit comments

Comments
 (0)