How to Set Up VS Code for Odoo 19 Development in Ubuntu
Setting up VS Code for Odoo 19 development on Ubuntu is the first practical step toward building and debugging custom Odoo modules efficiently. This complete tutorial is a beginner guide and step by step walkthrough of everything you need: installing Python 3.12 and all system dependencies, configuring PostgreSQL, cloning the Odoo 19 source, installing VS Code itself, creating a Python virtual environment, writing the odoo.conf configuration file, and wiring up the integrated debugger. By the end you will be able to launch Odoo 19 directly from VS Code with a single key press, set breakpoints in your custom modules, and access a running instance at localhost:8019. Whether you are asking how to configure a free IDE for Odoo, looking for a step by step guide from a beginner guide perspective, or hunting for the definitive complete tutorial that covers every shell command in order — this guide has you covered.
What You'll Learn:
- Why VS Code is the best free IDE for Odoo 19 development and how it compares to PyCharm Pro
- How to install Python 3.12 and every required system library on Ubuntu
- How to install and configure PostgreSQL for Odoo 19 with a dedicated database user
- How to clone the Odoo 19 source from GitHub at the correct branch depth
- How to install VS Code on Ubuntu using the official .deb package
- How to create a Python 3.12 virtual environment and install Odoo's Python requirements
- How to write a minimal but correct odoo.conf configuration file
- How to configure the VS Code debugger with a launch.json for Odoo 19
- Which VS Code extensions to install for maximum Odoo productivity
Why Choose VS Code for Odoo 19 Development?
The Odoo development ecosystem supports several IDEs, but VS Code has emerged as the community favourite for Odoo 19 work on Ubuntu. The reasons are practical and compelling. The Microsoft Python extension provides IntelliSense autocomplete, import resolution, and inline linting — features that PyCharm Professional also offers, but PyCharm requires a paid licence whereas VS Code is completely free and open source. For teams doing Odoo work alongside JavaScript OWL component development, VS Code's first-class JavaScript support — including OWL-aware snippets and ESLint integration — means a single editor handles the full stack.
VS Code also has excellent XML tooling for QWeb template development, an integrated terminal that stays in your workspace, GitLens for inline blame and history, and a debugger that connects to Python processes with zero configuration overhead once the launch.json is in place. The debugger is particularly valuable for Odoo work: you can set a breakpoint inside a model method, trigger the action from your browser, and inspect the ORM recordset directly in the VS Code Variables panel. This is the feature that makes VS Code preferable to a plain text editor for serious Odoo module development.
Python IntelliSense & Linting
The official Microsoft Python extension gives Odoo development full IntelliSense autocomplete, go-to-definition, find-all-references, and inline linting via Pylance. It resolves Odoo model fields and method signatures across your entire workspace, making it easy to navigate large codebases with dozens of custom modules without memorising every field name.
OWL JavaScript & XML Tools
Odoo 19's frontend is built on the OWL JavaScript framework. VS Code supports OWL component development natively through its JavaScript engine, ESLint integration, and Prettier formatting. The XML Tools extension adds XPath evaluation, formatting, and schema validation for QWeb templates — essential when working on custom views, reports, and website pages.
Integrated Debugger
VS Code's debugpy-based Python debugger lets you launch Odoo 19 directly from the editor with Ctrl+F5, set breakpoints in any Python file, and inspect live ORM recordsets in the Variables panel. This eliminates the need for print-statement debugging or separate debug server configurations. The debugger supports conditional breakpoints, watch expressions, and the interactive Debug Console.
Free & Open Source
VS Code is completely free and open source under the MIT licence, while PyCharm Professional — the closest competitor with comparable Python debugging support — requires a paid subscription starting at around $249/year per developer. For teams or freelancers setting up Odoo development environments, VS Code delivers all the IDE capabilities needed for Odoo 19 without any licence cost or activation overhead.
Pre-IDE Setup: System Dependencies
Before installing VS Code, you need to prepare the Ubuntu system with the correct Python version, system libraries, web tooling, PDF generation support, and a working PostgreSQL database. Odoo 19 requires Python 3.12 specifically — not the system default Python 3 that ships with Ubuntu 22.04 or 24.04. Follow each step in order; skipping any library installation will cause pip to fail when building C extensions in the next stage.
Step by Step Guide: Installing Everything for Odoo 19 on Ubuntu
Install Python 3.12 and System Libraries
Add the deadsnakes PPA to get Python 3.12, which is not available in the default Ubuntu repositories for all versions. After adding the PPA and updating, install Python 3.12 itself and the python3.12-dev package that provides the header files needed to compile C extensions. Then install all the system libraries that Odoo's Python dependencies build against: libjpeg-dev for image processing, libpq-dev for the PostgreSQL adapter, libxml2-dev and libxslt1-dev for XML/XSLT parsing, libldap2-dev and libsasl2-dev for LDAP authentication, and the remaining libraries for SSL, compression, and colour management. Missing any of these will cause pip to fail with a compilation error when installing Odoo's requirements.txt in a later step.
Install Web Dependencies (npm, Less, Node)
Odoo 19's web assets are compiled from Less stylesheets at runtime. Install npm, create the /usr/bin/node symlink so tools that expect node instead of nodejs work correctly, then install less and less-plugin-clean-css globally via npm. Also install node-less from the Ubuntu package manager as a fallback. If these tools are absent, Odoo will fail to compile its asset bundles and the web interface will not render correctly.
Install wkhtmltopdf and OpenSSL 1.1
Odoo uses wkhtmltopdf to generate PDF reports (invoices, delivery slips, etc.). Download the 0.12.5 bionic build from the wkhtmltopdf GitHub releases page — the Ubuntu 24.04 package repositories do not include this version and the newer wkhtmltopdf releases have known compatibility issues with Odoo. On Ubuntu 22.04 and 24.04, wkhtmltopdf also requires OpenSSL 1.1, which was removed from these distributions. Download the libssl1.1 .deb from the Ubuntu archive and install it with dpkg -i before installing wkhtmltopdf.
Set Up PostgreSQL and Create the Odoo Database User
Install postgresql and postgresql-client from the Ubuntu repositories. After installation, switch to the postgres system user and use the createuser command to create a PostgreSQL role named odoo19 with the --createdb flag. The interactive --pwprompt option will ask for a password — choose a strong one and record it for the odoo.conf file. Then connect to the PostgreSQL prompt with psql and grant SUPERUSER to the role, which Odoo requires to create and manage its own databases. Exit psql and the postgres session before proceeding.
Clone Odoo 19 from GitHub
Install git if not already present, then clone the official Odoo repository using --depth 1 --branch 19.0 --single-branch. The --depth 1 flag fetches only the latest commit rather than the entire repository history, which reduces the download size from several gigabytes to a few hundred megabytes. The directory will be named odoo19 in your current working directory. This folder's path is what you will reference in the addons_path setting of odoo.conf and as the workspaceFolder in VS Code's launch configuration.
Install VS Code on Ubuntu
Navigate to code.visualstudio.com and download the .deb package for Linux x64. Once downloaded, open a terminal in the download directory and install it with sudo dpkg -i <filename>.deb. If dpkg reports missing dependency errors, run sudo apt-get install -f afterwards to resolve them automatically. VS Code will appear in the Ubuntu application launcher after installation. Open it, then open your odoo19 folder as the workspace using File > Open Folder.
Create a Python 3.12 Virtual Environment and Install Requirements
Open a terminal in VS Code with Ctrl+Shift+`. Ensure pip is available for Python 3.12 by bootstrapping it with curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12, then install the venv module with sudo apt install python3.12-venv. Create the virtual environment with python3.12 -m venv your_venv_name, activate it with source your_venv_name/bin/activate, and install Odoo's Python dependencies with pip install -r requirements.txt. With the virtual environment active, VS Code will automatically detect it as the Python interpreter for the workspace when you select it via the Python: Select Interpreter command (Ctrl+Shift+P).
Configure the VS Code Debugger for Odoo 19
In VS Code, go to Run > Add Configuration, select Python Debugger, then Python File With Arguments. This creates a .vscode/launch.json file. Replace the generated configuration with the Odoo 19 configuration shown below — it sets the program to odoo-bin in the workspace folder and passes the --config argument pointing to your odoo.conf file. Once saved, press Ctrl+F5 to launch Odoo without debugging, or F5 to launch with full breakpoint support. Use Shift+F5 to stop and Ctrl+Shift+F5 to restart. When Odoo has fully started, open a browser and navigate to localhost:8019 to verify the setup.
Step 1 in Detail: Install Python 3.12
The deadsnakes PPA is a trusted community repository maintained specifically to provide up-to-date Python versions for Ubuntu. After adding the PPA, run apt-get update to refresh the package index, then install both python3.12 and all system development libraries in one command. This single install command covers everything Odoo's pip dependencies need to compile their C extensions successfully.
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.12
sudo apt-get install python3.12-dev build-essential libjpeg-dev libpq-dev libjpeg8-dev libxml2-dev libssl-dev libffi-dev libmysqlclient-dev libxslt1-dev zlib1g-dev libsasl2-dev libldap2-dev liblcms2-dev
Step 2 in Detail: Install Web Dependencies
Odoo 19 compiles Less stylesheets when it builds web asset bundles. Install npm, create the node symlink, and install the required Less processors. The sudo ln -s command is necessary because some tools and scripts reference /usr/bin/node rather than /usr/bin/nodejs, and without the symlink those tools will fail with a "node: command not found" error.
sudo apt-get install -y npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo npm install -g less less-plugin-clean-css
sudo apt-get install -y node-less
Step 3 in Detail: Install wkhtmltopdf and OpenSSL 1.1
Ubuntu 22.04 and 24.04 ship with OpenSSL 3.x, but the wkhtmltopdf 0.12.5 binary was built against OpenSSL 1.1. Install the libssl1.1 compatibility package first, then install the wkhtmltopdf .deb. Both packages are installed with sudo dpkg -i. Verify wkhtmltopdf installed correctly by running wkhtmltopdf --version in the terminal after installation.
sudo wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
After installing OpenSSL 1.1, download the wkhtmltopdf package from GitHub. For Ubuntu 24.04 (Noble), use the bionic build which is the last stable version confirmed to work with Odoo. Download it from github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb and install it with dpkg.
Step 4 in Detail: Install PostgreSQL and Create the Odoo 19 Database User
Odoo 19 requires PostgreSQL as its exclusive database engine. Install both the server and client packages from the Ubuntu repositories. After installation, switch to the postgres OS user (which has superuser access to the PostgreSQL instance) and create the Odoo database role. The createuser flags used here deliberately avoid granting superuser and createrole to follow the principle of least privilege at creation time — you then grant SUPERUSER explicitly via the psql prompt because Odoo's installer requires it to create databases.
sudo apt install postgresql postgresql-client
Once PostgreSQL is installed and running, switch to the postgres system user and create the Odoo 19 database role. The --pwprompt flag will ask you to set a password interactively — keep this password handy because you will add it to odoo.conf in the next step.
sudo su - postgres
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo19
psql
ALTER USER odoo19 WITH SUPERUSER;
q
exit
Step 5 in Detail: Clone Odoo 19 from GitHub
Use the shallow clone flags to download only the latest state of the 19.0 branch. This keeps the download small and avoids fetching years of commit history that you do not need for development. The resulting odoo19/ directory is where VS Code should be opened as a workspace, and where odoo-bin (the main launcher) lives.
sudo apt-get install git
git clone https://www.github.com/odoo/odoo --depth 1 --branch 19.0 --single-branch odoo19
Step 7 in Detail: Create the Virtual Environment and Install Requirements
Open VS Code and press Ctrl+Shift+` to open the integrated terminal. The commands below bootstrap pip for Python 3.12, install the venv module, create the virtual environment, activate it, and install all of Odoo's Python requirements. The pip install -r requirements.txt command will use the system libraries installed in Step 1 to compile the C extensions — this is why the system library step must be completed first.
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12
sudo apt install python3.12-venv
python3.12 -m venv your_venv_name
source your_venv_name/bin/activate
pip install -r requirements.txt
Writing the odoo.conf Configuration File
The odoo.conf file tells Odoo where to find the database, which addons to load, and which port to listen on. Create this file at the root of your odoo19 workspace folder. The addons_path should point to the standard Odoo addons directory — you can add more comma-separated paths here later when you create custom module directories. The http_port is deliberately set to 8019 so this development instance runs on a different port from any other Odoo instance running on the default port 8069.
[options]
admin_passwd = admin
db_host = localhost
db_port = 5432
db_user = odoo19
db_password = your_password
addons_path = /home/user/odoo19/addons
http_port = 8019
Never Hardcode Passwords in odoo.conf for Production
The db_password and admin_passwd values shown above are placeholders for your local development environment only. Never commit odoo.conf to a git repository — add it to your .gitignore immediately. For staging and production deployments, inject these values via environment variables or a secrets manager. The admin_passwd (also known as the master password) controls access to the database manager at /web/database/manager — use a long, randomly generated value in any non-local environment.
Why Set http_port to 8019?
Setting http_port = 8019 in your development odoo.conf lets this Odoo 19 instance run on a distinct port from the default Odoo port of 8069. This is especially useful if you have an existing Odoo instance running locally (for example, a production backup you are testing against), or if you are developing multiple Odoo versions in parallel. Both instances can run simultaneously without port conflicts — browse your Odoo 19 development instance at localhost:8019 and any other instance at its own port. The pattern of using the version number as the port number (8019 for Odoo 19, 8018 for Odoo 18, etc.) is a widely adopted convention in the Odoo development community.
Step 8 in Detail: Configure the VS Code Debugger
With the workspace open in VS Code and the Python extension installed, set up the debugger by going to Run > Add Configuration in the menu bar. Select Python Debugger from the dropdown, then Python File With Arguments. VS Code creates a .vscode/launch.json file in your workspace. Replace the default content with the configuration below. This tells the VS Code debugger to launch odoo-bin at the workspace root, pass the --config argument pointing to your odoo.conf, and use the integrated terminal so you can see Odoo's log output directly in VS Code.
Install the Microsoft Python extension from the Extensions panel first (Ctrl+Shift+X, search "Python"), which installs debugpy — the debug adapter that powers the configuration below. Without the Python extension, the "type": "debugpy" field will not be recognised and the launch configuration will not start.
{
"version": "0.2.0",
"configurations": [
{
"name": "Odoo 19",
"type": "debugpy",
"request": "launch",
"console": "integratedTerminal",
"program": "${workspaceFolder}/odoo-bin",
"args": ["--config=${workspaceFolder}/odoo.conf"],
"cwd": "${workspaceFolder}"
}
]
}
Keyboard Shortcuts: Launching and Stopping Odoo 19 in VS Code
Once the launch configuration is saved, use the following keyboard shortcuts to control the Odoo 19 process directly from VS Code without touching the terminal. The integrated terminal will show Odoo's log output in real time as the server starts, installs modules, and handles requests.
| Action | Keyboard Shortcut | Notes |
|---|---|---|
| Start without debugging | Ctrl+F5 | Launches Odoo; breakpoints are ignored, faster startup |
| Start with debugging | F5 | Launches Odoo; pauses at breakpoints in Python code |
| Stop Odoo | Shift+F5 | Terminates the running Odoo process |
| Restart Odoo | Ctrl+Shift+F5 | Stops and immediately relaunches; useful after module changes |
| Toggle breakpoint | F9 | Set or remove a breakpoint on the current line |
| Step over | F10 | Execute current line, step to next |
| Step into | F11 | Step into the function call on the current line |
Recommended VS Code Extensions for Odoo 19 Development
The following extensions significantly improve the Odoo 19 development experience in VS Code. Install them from the Extensions panel (Ctrl+Shift+X) by searching for each extension name. The Python extension is mandatory for debugger support — the rest are highly recommended but optional depending on the type of Odoo work you are doing.
| Extension | Purpose | Key Feature |
|---|---|---|
| Python (Microsoft) | Core Python IDE support | IntelliSense, linting, debugpy integration, virtual environment selection |
| Odoo Snippets | Odoo-specific code scaffolding | Snippets for models, views, controllers, manifest files, and security records |
| XML Tools | QWeb template development | XML formatting, XPath evaluation, tag auto-close, and namespace support for Odoo views |
| ESLint | JavaScript / OWL linting | Inline lint errors and warnings for OWL component files and Odoo JS modules |
| GitLens | Git history and blame | Inline git blame on every line, full commit history, branch comparison, and visual diff tools |
| Prettier | Code formatter | Consistent formatting for JavaScript, JSON, CSS, and HTML files on save |
| PostgreSQL Client | Database inspection | Browse Odoo database tables, run queries, and inspect records without leaving VS Code |
Verifying Your Odoo 19 Development Setup
After completing all eight steps, perform the following verification checks to confirm everything is working correctly before you start module development.
First, confirm the virtual environment is active in the VS Code terminal — you should see the venv name in parentheses in the prompt. If not, run source your_venv_name/bin/activate again. Check that VS Code is using the correct Python interpreter by looking at the bottom status bar — it should show the Python 3.12 interpreter from inside your virtual environment, not the system Python.
Press Ctrl+F5 to launch Odoo 19 without debugging. Watch the integrated terminal — you should see Odoo's startup log including lines confirming it connected to PostgreSQL, loaded the addons, and started the HTTP server on port 8019. Once you see a line like INFO ? odoo.service.server: HTTP service (werkzeug) running on 0.0.0.0:8019, open a browser and navigate to http://localhost:8019. The Odoo database selector or login page should appear.
To verify the debugger works, open any Python model file in the Odoo source — for example odoo/models.py — and press F9 on any line inside a method to set a breakpoint. Then press F5 to restart with debugging. Trigger a web request that would execute that method and VS Code should pause at the breakpoint, showing local variables in the Debug panel. Press F5 again to continue execution. This confirms the complete debugger loop is working.
Frequently Asked Questions
Can I use VS Code for Odoo 19 development on Ubuntu 24.04?
Yes. VS Code works on Ubuntu 24.04 (Noble Numbat) without any issues. The key extra step for Ubuntu 24.04 is installing the libssl1.1 compatibility package before installing wkhtmltopdf 0.12.5, because Ubuntu 24.04 ships OpenSSL 3.x and dropped the older 1.1 libraries. Everything else in this guide applies to both Ubuntu 22.04 and 24.04 without changes.
Why does VS Code show "No Python interpreter selected" after creating the virtual environment?
VS Code needs to be told which Python interpreter to use. Press Ctrl+Shift+P and type Python: Select Interpreter. A list of detected interpreters will appear — look for the one that points to your virtual environment's bin/python path. If it does not appear in the list, click Enter interpreter path and browse manually to your_venv_name/bin/python3.12. The selected interpreter is displayed in the bottom status bar and is also what the debugger uses.
How do I add a custom module directory to the Odoo 19 addons path?
Open odoo.conf and extend the addons_path value with a comma-separated list of directory paths. For example: addons_path = /home/user/odoo19/addons,/home/user/my_custom_modules. After saving odoo.conf, restart Odoo with Ctrl+Shift+F5 in VS Code. Then go to Settings > Activate Developer Mode in the Odoo UI and navigate to Apps > Update Apps List to make Odoo discover and register your new modules.
What is the difference between pressing F5 and Ctrl+F5 to start Odoo in VS Code?
F5 launches Odoo with the full Python debugger attached — breakpoints are active, and VS Code will pause execution whenever it hits a breakpoint. This is slightly slower to start. Ctrl+F5 launches Odoo without the debugger, meaning breakpoints are ignored and Odoo starts at full speed. Use Ctrl+F5 for general browsing and testing, and switch to F5 only when you need to step through specific code paths. Both modes use the same launch.json configuration.
Does VS Code support Odoo 19 OWL JavaScript component debugging?
VS Code does not debug OWL components through the Python debugger — OWL is a browser-side framework. For OWL JavaScript debugging, use the browser's built-in developer tools (F12 in Chrome or Firefox) and set breakpoints directly in the JavaScript source maps. VS Code does provide excellent editing support for OWL via JavaScript IntelliSense, ESLint linting, and Prettier formatting. You can also use the VS Code Chrome Debugger extension to attach VS Code's debugging interface to a running Chrome instance and debug JavaScript breakpoints from within VS Code.
Need Help Setting Up Your Odoo 19 Development Environment?
Our certified Odoo developers can help you configure a production-ready Odoo 19 development environment, set up custom module scaffolding, and accelerate your team's onboarding to the Odoo 19 platform.
About the author
Founder & Odoo Practice Lead, Braincuber Technologies
Founder of Braincuber. Has scoped and shipped 500+ Odoo implementations for US mid-market and global brands. Takes every founder call personally — no SDR layer between buyers and the people building the system.
