You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Git bash failed to execute Run/debug when Window username have blank space #678
$ "C:\\Users\\Andree Hai\\.vscode\\extensions\\vscjava.vscode-java-debug-0.22.0\\scripts\\launcher.bat" "C:\\Program Files\\AdoptOpenJDK\\jdk-8
.0.222.10-hotspot\\\\bin\\java" -agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:65414 -Dfile.encoding=UTF-8 -cp "C:\\Us
ers\\Andree Hai\\_workspace\\introjava\\assign4\\bin" app.App2
'C:\Users\Andree' is not recognized as an internal or external command,
operable program or batch file.
It seems to be related with the launcher.bat command. For testing purposes, if I remove the launcher.bat out of the equation and paste the contents of the temp arg file, then I get something along the lines of
It seems this problem cannot be solved without change %USERPROFILE% folder to one without spaces. I've switched to portable VSCode instead, which is more convinient and easily to move the editor around. https://code.visualstudio.com/docs/editor/portable
It seems to be related with the launcher.bat command. For testing purposes, if I remove the launcher.bat out of the equation and paste the contents of the temp arg file, then I get something along the lines of
m1ndwalker You're right. I also can reproduce this in git bash. If the first argument after the bat contains space (e.g. "x y"), the bat file failed because of unexpected path.
This is a Git bash issue. To unblock the debugger users who're using Git bash, i would disable the launcher.bat if the windows user name has blank spaces.
Activity
testforstephen commentedon Sep 29, 2019
The error style looks like running in cmd.
The bash error is like
bash: C:\Users\jinbwan : No such file or directoryCould you kill all existing terminals and try again?
vtvh commentedon Sep 29, 2019
My default shell is Git Bash

"terminal.integrated.shell.windows": "C:\Program Files\Git\bin\bash.exe",
testforstephen commentedon Sep 30, 2019
Using double quote to escape spaces works for my git bash environment.

Here is my git environment. Not sure what's difference with yours.
Git Version:
Git installation options:
Git Bash:
Also found a similar issue in git repository git-for-windows/git#2219 .
m1ndwalker commentedon Nov 1, 2019
I'm having exactly the same issue!
It seems to be related with the launcher.bat command. For testing purposes, if I remove the launcher.bat out of the equation and paste the contents of the temp arg file, then I get something along the lines of
"C:\\Users\Joel Alvim\DevelopmentTools\Java\JDK11\bin\java" -Dfile.encoding=UTF-8 -classpath "C:\\Users\\Joel Alvim\\Documents\\MyData\\Projects\\CSVtoJSON\\target\\classes;C:\\Users\\Joel Alvim\\.m2\\repository\\com\\fasterxml\\jackson\\core\\jackson-core\\2.9.8\ \jackson-core-2.9.8.jar;C:\\Users\\Joel Alvim\\.m2\\repository\\com\\fasterxml\\jackson\\core\\jackson-databind\\2.9.8\\jackson-databind-2.9.8.jar;C:\\Users\\Joel Alvim\\.m2\\repository\\com\\fasterxml\\jackson\\core\\jackson-annotations\\2.9.0\\jackson-annotations- 2.9.0.jar" some.AppThis above works in the integrated terminal
The original below doesn't
"C:\\Users\\Joel Alvim\\.vscode\\extensions\\vscjava.vscode-java-debug-0.23.0\\scripts\\launcher.bat" "C:\\Users\\Joel Alvim\\DevelopmentTools\\Java\\JDK11\\bin\\java" -Dfile.encoding=UTF-8 @C:\\Users\\JOELAL~1\\AppData\\Local\\Temp\\cp_9i03mo6zpdpj3xoi5eid3h5gr.a rgfile some.Apptestforstephen commentedon Nov 6, 2019
Could you have a try to change the terminal to powershell or cmd?
m1ndwalker commentedon Nov 7, 2019
For me that works, but the whole point was to use the power of 'nix
vtvh commentedon Nov 26, 2019
It seems this problem cannot be solved without change %USERPROFILE% folder to one without spaces. I've switched to portable VSCode instead, which is more convinient and easily to move the editor around.
https://code.visualstudio.com/docs/editor/portable
edu-eng commentedon Jan 27, 2020
@andreehai1011 Take the test by switching to PowerShell
testforstephen commentedon Jan 20, 2021
m1ndwalker You're right. I also can reproduce this in git bash. If the first argument after the bat contains space (e.g.

"x y"), the bat file failed because of unexpected path.This is a Git bash issue. To unblock the debugger users who're using Git bash, i would disable the launcher.bat if the windows user name has blank spaces.