Skip to content

Unable to launch a debug session through WSL 2 bash and "terminalKind" set to "integrated" or "external" #205

Description

@marius-nicolae

When trying to launch a debug session through WSL 2 bash it fails with an error message like:

C:\Users\Redacted\AppData\Local\Programs\Microsoft VS Code> cd . && wsl.exe bash -c "cd ""/mnt/d/Users/Redacted/Work/Toys/Go/SystemdTestService""; while [[ ^! -p ""/tmp/vscode-bash-debug-fifo-12572"" ]]; do sleep 0.25; done; ""bash"" ""/mnt/c/Users/Redacted/.vscode/extensions/rogalmic.bash-debug-0.3.9/bashdb_dir/bashdb"" --quiet --tty ""/tmp/vscode-bash-debug-fifo-12572"" --tty_in ""/tmp/vscode-bash-debug-fifo-12572_in"" --library ""/mnt/c/Users/Redacted/.vscode/extensions/rogalmic.bash-debug-0.3.9/bashdb_dir"" -- ""/mnt/d/Users/Redacted/Work/Toys/Go/SystemdTestService/scripts/deployService.sh""  " 
bash: -c: line 1: conditional binary operator expected
bash: -c: line 1: syntax error near `-p'
bash: -c: line 1: `cd /mnt/d/Users/Redacted/Work/Toys/Go/SystemdTestService; while [[ ^! -p /tmp/vscode-bash-debug-fifo-12572 ]]; do sleep 0.25; done; bash /mnt/c/Users/Redacted/.vscode/extensions/rogalmic.bash-debug-0.3.9/bashdb_dir/bashdb --quiet --tty /tmp/vscode-bash-debug-fifo-12572 --tty_in /tmp/vscode-bash-debug-fifo-12572_in --library /mnt/c/Users/Redacted/.vscode/extensions/rogalmic.bash-debug-0.3.9/bashdb_dir -- /mnt/d/Users/Redacted/Work/Toys/Go/SystemdTestService/scripts/deployService.sh  '

As may be seen, the troubling part is the while [[ ^! -p /tmp/vscode-bash-debug-fifo-12572 ]]; - it adds an "unwelcommed" ^ char berfore -p negation. When connection through the vscode's WSL extension, the debug extension launch correctly (the ^ is missing; as it should, according to debugBash.ts:155).

My setup is:

  • Windows 11 25H2 (WSL2)

  • vscode 1.131.0 (user setup)
    Commit: e4c7e7b1d6d060162f4aa7f8225271b67ce1df75
    Date: 2026-07-28T10:51:25Z
    Electron: 42.7.0
    ElectronBuildId: 14710161
    Chromium: 148.0.7778.280
    Node.js: 24.18.0
    V8: 14.8.178.38-electron.0
    OS: Windows_NT x64 10.0.26200

  • rogalmic.bash-debug 0.3.9

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions