Giter VIP home page Giter VIP logo

docker-odoo-dev's Introduction

Project Template README: Debug Odoo with Docker in VSCode

Overview

This project template facilitates Odoo development using Docker, specifically configured for VSCode IDE. It includes setup instructions and tips for effective debugging using the Odoo IDE extension.

Prerequisites

Before proceeding, ensure you have the following installed:

  1. Docker
  2. Git
  3. VSCode with the following extensions:
    • Docker
    • Odoo IDE
    • Python Debugger

Setup Steps

  1. Clone the Project

    git clone https://github.com/teguhteja/docker-odoo-dev.git -b 17
  2. Get Odoo Stubs Run the script to fetch the odoo-stub folder:

    ./git-clone-odoo-stubs.sh
  3. Build Docker Image Build the Odoo development image:

    docker build -t odoodev:17 .
  4. Start Docker Compose Launch Odoo 17 and PostgreSQL 16 containers:

    docker compose up -d
  5. Add Your Addons Place your addons in the custom-addons folder and restart the Docker stack (docker compose restart odoo-dev) using docker extension vscode.

  6. Debugging

    • Set breakpoints in your source code within VSCode.
    • Ensure the debugger is configured to debug external code ("justMyCode": false in launch.json).
    • Access the Odoo source code from the container:
      ./docker-cp-odoo.sh
    • Add breakpoints in the Odoo source code.
    • Run the debugger process to start debugging.

Troubleshooting Tips

  1. Copying misc.py in odoodev If backup failures occur with Docker images, modify misc.py to resolve issues.

  2. Debugging Odoo Source Code Modify "justMyCode": false in launch.json, download the Odoo folder from the container using docker-cp-odoo.sh, uncomment this line in docker-compose.yml - ./odoo:/usr/lib/python3/dist-packages/odoo restart stack or docker compose add breakpoints, and start the debugger process .

Conclusion

This README provides detailed steps to set up an Odoo development environment using Docker and VSCode, enabling efficient debugging of Odoo applications. For further details, refer to the full documentation and scripts available in the project repository.


For detailed scripts and further instructions, visit docker-odoo-dev.

docker-odoo-dev's People

Contributors

teguhteja avatar mjavint avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.