Description
AHK++ fails to start when another VS Code extension sets DEBUG environment variable to a non-empty string (e.g. OpenAI Codex sets DEBUG=release).
The extension resolves the server path using:
process.env.DEBUG ? "out" : "dist"
Since any non-empty string is truthy in JavaScript, AHK++ picks out/server.js instead of dist/server.js, which doesn't exist, causing the server to crash on startup.
Reproduction steps
Steps to reproduce the behavior:
- Install OpenAI Codex extension
- Restart VS Code
- AHK++ server fails to start with
Cannot find module '...server/out/server.js'
Fix suggestion
Replace the truthy check with a strict comparison:
process.env.DEBUG === "true" ? "out" : "dist"
Description
AHK++ fails to start when another VS Code extension sets DEBUG environment variable to a non-empty string (e.g. OpenAI Codex sets DEBUG=release).
The extension resolves the server path using:
Since any non-empty string is truthy in JavaScript, AHK++ picks out/server.js instead of dist/server.js, which doesn't exist, causing the server to crash on startup.
Reproduction steps
Steps to reproduce the behavior:
Cannot find module '...server/out/server.js'Fix suggestion
Replace the truthy check with a strict comparison: