VSCode + Bash

Quick fix for anyone getting bash: EngineBuildBatchFilesBuild.bat: command not found when running the Development build task in the “Compiling a C++ Project” lecture of the " Unreal 5.0 C++ Developer: Learn C++ and Make Video Games" course.

This occurs because your default integrated terminal/shell in VSCode is set to bash (probably Git bash if you’ve been working with Git). All the solutions I found for this were people changing their default shell to Windows “cmd”, but I’m stubborn and didn’t want to settle for anything less than good ol’ bash.

VSCode has per-workspace settings, where you can tell it to use “cmd” for this project without overriding your default across all VSCode projects:

  1. Press CTRL + , to open your settings
  2. Click ‘Workspace’ at the top just under the search bar
  3. Once you’re looking at the workspace settings, put “terminal.integrated.defaultProfile.windows” in the search bar
  4. Change the “Terminal > Integrated > Default Porfile: Windows” setting which appears (it should be the only one) to “Command Prompt” (or whichever of your terminal profiles runs “cmd”

These settings are for Windows, but if you’re on OS X replace the search in step 3 with “terminal.integrated.defaultProfile.osx” and if you’re on Linux then instead replace it with “terminal.integrated.defaultProfile.linux”

Ultimately if your main development in VSCode will be in UE then changing your global default will instead be best (follow the steps above, but skip Step 2 and stay in the User settings) but for people like me who prefer bash and will use VSCode for enough other things, this will hopefully save a potential headache.

1 Like

I prefer my default profile to be Bash. So, as an alternative, one can do this:

"terminal.integrated.automationProfile.windows": {
  "path": "cmd.exe",

This will allow you to use your perferred shell in the terminal, be that CMD, PowerShell, Bash, or whatever. But it will give Unreal the expected CMD when executing/debugging.

Yep that’s another way of doing what I outlined above :slight_smile:

The only reason I outlined it the way I did was for people who preferred the GUI way to the JSON way. If you’re doing it the way you’ve put there, though, make sure you’re in the JSON file for the Workspace settings and not the User settings

Privacy & Terms