Setup BGE autocomplete in VS Code

VS Code’s pretty great and is even better with UPBGE autocomplete! To get it working, do this:

On Windows (apparently works on Linux too!):

  1. Install VS Code (duh) & the Python addon by Don Jayamanne
  2. Download & extract from post #8 here:
  3. Open cmd prompt (perhaps right in VS Code, ctrl+shift+`)
  4. Navigate to where you extracted the (where the file resides)
  5. add the following below line 350 of in extracted BGEMockGen dir to get all the API
build(url + "bge.render.html")
  1. (assuming python is in your path & still in the file location) type:

6a) If errors out with missing module “requests” like it did for me, try running the following and go back to step 5 if successful:

pip.exe install requests
  1. In VS Code, open Settings (File > Settings) & locate “python.autoComplete.extraPaths” and hit the little pencil that appears next to it
  2. A text panel should open to the right. Edit the C:\Path\To\BGEMockGen\API bit (duh again):
{"python.autoComplete.extraPaths": ["C:\\Path\\To\\BGEMockGen\\API"]}
  1. Save or something & restart code (not sure if this is necessary but :shrug-emoticon: )

Viola, you should be able to autocomplete bge code with the best of them now!
PS Thanks to elmeunick9 for the scraper & TwisterGE for Linux testing this method/UPBGE in general!!!

1 Like

Bad link and where is this " the Python addon by Don Jayamanne"?

The addon is on VSCode extension marketplace, and if you were to look just a bit around you would have found an alternative thread: Bundle (