Developing with Visual Studio Code
First, install the following extension:
Before starting the debugging session, make sure that Metabase is built and running. Choose menu View, Command Palette, search for and choose Tasks: Run Build Task. Alternatively, use the corresponding shortcut
Ctrl+Shift+B. The built-in terminal will appear to show the progress, wait a few moment until webpack indicates a complete (100%) bundling.
To begin debugging Metabase, switch to the Debug view (shortcut:
Ctrl+Shift+D) and then select one of the two launch configurations from the drop-down at the top:
- Debug with Firefox, or
- Debug with Chrome
After that, begin the debugging session by choosing menu Run, Start Debugging (shortcut:
For more details, please refer to the complete VS Code documentation on Debugging.
These instructions allow you to work on Metabase codebase on Windows, Linux, or macOS using Visual Studio Code, without manually installing the necessary dependencies. This is possible by leveraging Docker container and the Remote Containers extension from VS Code.
For more details, please follow the complete VS Code guide on Developing inside a Container.
- Visual Studio Code (obviously)
- Remote - Containers extension for VS Code
Important: Ensure that Docker is running properly and it can be used to download an image and launch a container, e.g. by running:
$ docker run hello-world
If everything goes well, you should see the following message:
Hello from Docker! This message shows that your installation appears to be working correctly.
Clone Metabase repository
Launch VS Code and open your cloned Metabase repository
From the View menu, choose Command Palette… and then find Remote-Container: Reopen in Container. (VS Code may also prompt you to do this with an “Open in container” popup). Note: VS Code will create the container for the first time and it may take some time. Subsequent loads should be much faster.
Use the menu View, Command Palette, search for and choose Tasks: Run Build Task (alternatively, use the shortcut
See here for more on running development branches of Metabase using Docker.