It's ridiculously easy -
Setup happens in two steps -
- Github will first create a codespace
- Once the codespace is initialized (you will see VSCode UI) a script runs that will -
- Create a bench with Frappe develop branch and configure it
- Create a new site called dev.localhost with the password
admin
- Enables developer mode, sets dev.localhost as default site
- A fresh bench is initialized with the latest Frappe develop code along with a new site when the codespace is initially created
- Pre-configured
launch.json
with the following options -- Web Server
- 3 Workers
- Bench Watch
- Pre-installed Extensions
- Pre-configured SQLTools
- The init script takes some time, so you can track the progress by selecting the "Codespaces : View Creation Log" from the command palette. Ideally you should wait until this process is completed.
- The Procfile generated includes
bench serve
sobench start
will work as usual, however if you'd like to use the debugger, you want to remove thebench serve
line in the Procfile and runBench Web
from VSCode instead - I've configured the settings so that the Python extension points to the correct python in the venv be default, however if you're having issues with VSCode's linter behaving badly or the launch options not working (frappe not found) do check which python binary VSCode is using
- Github Codespaces works with the native version of VSCode for virtually native experience, you only need to install the Codespaces extension and configure it to connect to your Codespace. I recommend doing this over using the browser.