Repository navigation
debugjava script is not executable and uses CRLF line endings on Linux #1662
Copy link
Copy link
Closed
Labels
Description
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:
debugjavafails withPermission 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
debugjavawith the executable bit set. - Package the script with LF line endings instead of CRLF.
Reactions are currently unavailable
Activity
github-actions commentedon Jul 31, 2026
Hi MATSUSHITA Youzou (@matsushitayou), I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.
Workaround
• Install
dos2unixin your container:apt update && apt install -y dos2unix• Convert line endings to LF and set the executable bit on the bundled script:
• To automate this in a DevContainer, add to your
.devcontainer/devcontainer.json:Feature Request
• The extension should ship
debugjavawith LF line endings and have the executable bit set by default.The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!
wenytang-ms commentedon Sep 14, 2026
we shipped
0.59.2026091007forvscode java debugger, please upgrade to the latest prerelease version to verify, thanks!