Develop in OdooLS
If you want to contribute to OdooLS, here are some tips for setting up your environment:
- All repositories (
odoo-ls, odoo-vscode, odoo-pycharm, ...) are designed to sit next to each other in a single parent folder. Build scripts and tooling assume this layout.
- In your IDE/Editor, open each repository as a separate root folder. For example, in VS Code: open
odoo-ls first, then use Add Folder to Workspace to add odoo-vscode. This gives you launch configurations from both projects.
- You can run OdooLS with
cargo run, but the server will just sit there waiting — by default it communicates over stdio, expecting an IDE/Editor extension on the other end. For debugging, use TCP mode instead: cargo run -- --use-tcp. The server will listen on localhost:2087.
- We provide ready-made
launch.json configurations in .vscode/: LLDB and GDB for Linux/macOS, and cppvsdbg for Windows.
- To debug end-to-end, run both the server and your IDE extension in debug mode. The extension's debug configuration typically connects to the server via TCP automatically.
Run tests
Run all tests with:
cargo test
Make sure you've initialized submodules first (git submodule init && git submodule update) — tests depend on typeshed.