Expected behavior
debugjava should be executable in Linux environments without any manual modification.
Actual behavior
The bundled debugjava script:
- is not marked as executable
- uses CRLF line endings
As a result:
- debugjava fails with Permission denied.
- Even after manually adding the executable bit (chmod +x), the script still fails because of CRLF line endings.
My environment
- DevContainer: mcr.microsoft.com/devcontainers/base:bookworm
- Version of Debugger for java: 0.59.0
Steps to reproduce
$ code --list-extensions --show-versions | grep vscjava.vscode-java-debug
vscjava.vscode-java-debug@0.59.0
$ debugjava
bash: /home/vscode/.vscode-remote/extensions/vscjava.vscode-java-debug-0.59.0/bundled/scripts/noConfigScripts/debugjava: Permission denied
$ ls -l $(command -v debugjava)
-rw-r--r-- 1 vscode vscode 611 Jul 30 15:47 /home/vscode/.vscode-remote/extensions/vscjava.vscode-java-debug-0.59.0/bundled/scripts/noConfigScripts/debugjava
$ bash $(command -v debugjava)
/home/vscode/.vscode-remote/extensions/vscjava.vscode-java-debug-0.59.0/bundled/scripts/noConfigScripts/debugjava: line 4: $'\r': command not found
/home/vscode/.vscode-remote/extensions/vscjava.vscode-java-debug-0.59.0/bundled/scripts/noConfigScripts/debugjava: line 7: $'\r': command not found
/home/vscode/.vscode-remote/extensions/vscjava.vscode-java-debug-0.59.0/bundled/scripts/noConfigScripts/debugjava: line 10: $'\r': command not found
/home/vscode/.vscode-remote/extensions/vscjava.vscode-java-debug-0.59.0/bundled/scripts/noConfigScripts/debugjava: line 11: $'\r': command not found
node:internal/modules/cjs/loader:1520
throw err;
^
/jdwp-wrapper.js'd module '/home/vscode/.vscode-remote/extensions/vscjava.vscode-java-debug-0.59.0/bundled/scripts/noConfigScripts
at Module._resolveFilename (node:internal/modules/cjs/loader:1517:15)
at wrapResolveFilename (node:internal/modules/cjs/loader:1071:27)
at defaultResolveImplForCJSLoading (node:internal/modules/cjs/loader:1095:10)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1122:12)
at Module._load (node:internal/modules/cjs/loader:1294:5)
at wrapModuleLoad (node:internal/modules/cjs/loader:255:19)
at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:154:5)
at node:internal/main/run_main_module:33:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v24.18.1
$ file $(command -v debugjava)
/home/vscode/.vscode-remote/extensions/vscjava.vscode-java-debug-0.59.0/bundled/scripts/noConfigScripts/debugjava: Bourne-Again shell script, ASCII text executable, with CRLF line terminators
Proposed fix
- Package debugjava with the executable bit set.
- Package the script with LF line endings instead of CRLF.
Reactions are currently unavailable
Expected behavior
debugjava should be executable in Linux environments without any manual modification.
Actual behavior
The bundled debugjava script:
As a result:
My environment
Steps to reproduce
$ code --list-extensions --show-versions | grep vscjava.vscode-java-debug vscjava.vscode-java-debug@0.59.0 $ debugjava bash: /home/vscode/.vscode-remote/extensions/vscjava.vscode-java-debug-0.59.0/bundled/scripts/noConfigScripts/debugjava: Permission denied $ ls -l $(command -v debugjava) -rw-r--r-- 1 vscode vscode 611 Jul 30 15:47 /home/vscode/.vscode-remote/extensions/vscjava.vscode-java-debug-0.59.0/bundled/scripts/noConfigScripts/debugjava $ bash $(command -v debugjava) /home/vscode/.vscode-remote/extensions/vscjava.vscode-java-debug-0.59.0/bundled/scripts/noConfigScripts/debugjava: line 4: $'\r': command not found /home/vscode/.vscode-remote/extensions/vscjava.vscode-java-debug-0.59.0/bundled/scripts/noConfigScripts/debugjava: line 7: $'\r': command not found /home/vscode/.vscode-remote/extensions/vscjava.vscode-java-debug-0.59.0/bundled/scripts/noConfigScripts/debugjava: line 10: $'\r': command not found /home/vscode/.vscode-remote/extensions/vscjava.vscode-java-debug-0.59.0/bundled/scripts/noConfigScripts/debugjava: line 11: $'\r': command not found node:internal/modules/cjs/loader:1520 throw err; ^ /jdwp-wrapper.js'd module '/home/vscode/.vscode-remote/extensions/vscjava.vscode-java-debug-0.59.0/bundled/scripts/noConfigScripts at Module._resolveFilename (node:internal/modules/cjs/loader:1517:15) at wrapResolveFilename (node:internal/modules/cjs/loader:1071:27) at defaultResolveImplForCJSLoading (node:internal/modules/cjs/loader:1095:10) at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1122:12) at Module._load (node:internal/modules/cjs/loader:1294:5) at wrapModuleLoad (node:internal/modules/cjs/loader:255:19) at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:154:5) at node:internal/main/run_main_module:33:47 { code: 'MODULE_NOT_FOUND', requireStack: [] } Node.js v24.18.1 $ file $(command -v debugjava) /home/vscode/.vscode-remote/extensions/vscjava.vscode-java-debug-0.59.0/bundled/scripts/noConfigScripts/debugjava: Bourne-Again shell script, ASCII text executable, with CRLF line terminatorsProposed fix