Debug Odoo source code using Docker and Visual Studio Code
- Install docker
- clone
odoo-development-template
and run command
git clone https://github.com/anhvu-sg/odoo-development-template.git
cd odoo-development-template
docker-compose up -d --build
- Connect to the instance via http://localhost:8069, install
custom_module
- Active debug -> go to VSCode -> Debug -> run
Odoo: Attach
- Try to create a new res.partner
- download the latest docker
- Enable VirtioFS, VirtioFS is only available to users of the following macOS versions:
- macOS 12.2 and above (for Apple Silicon)
- macOS 12.3 and above (for Intel)
- To enable virtiofs in Docker Desktop: Ensure that you are using Docker Desktop version 4.6, available here Navigate to ‘Preferences’ (the gear icon) > ‘Experimental Features’ Select the ‘Use the new Virtualization framework’ and ‘Enable VirtioFS accelerated directory sharing’ toggles Click ‘Apply & Restart’