Skip to content

Draft: [IMP] t2d: Add support for vscode with devcontainer.json - #169

Closed
antonag32 wants to merge 1 commit into
Vauxoo:mainfrom
vauxoo-dev:devcontainer-anton
Closed

Draft: [IMP] t2d: Add support for vscode with devcontainer.json#169
antonag32 wants to merge 1 commit into
Vauxoo:mainfrom
vauxoo-dev:devcontainer-anton

Conversation

@antonag32

@antonag32 antonag32 commented Oct 6, 2022

Copy link
Copy Markdown
Contributor

Related to #158

This PR adds supports for devcontainers, a really cool option that integrates with vscode and automatically creates development containers.

If everything goes well, when you open a folder with a .devcontainer.json file vscode automatically gives you the option to reopen in a remote container. With the proposed devcontaner.json this will open a vscode instance with:

  • Three basic extensions for Odoo Development:
    • Python Extension for Inbuilt debugging (no more pdb.set_trace() 🤩 )
    • Red Hat XML to support editing XML files (views, menus, etc...)
    • Rainbow CSV to have an easier time editing ir.access.model.csv records.

More extensions can easily be added, I only use/know of those three for Odoo development.

Odoo source code is also added to extraPaths which basically means you can Ctrl + Click on something like from odoo import models and have a new tab with the source code on it. This also means that function arguments to stuff like search are suggested now based on Odoo's source code.

I am not very familiar with t2d source code so reviews are welcome since I am not sure I am placing the new feature in the correct place.

@codecov-commenter

codecov-commenter commented Oct 6, 2022

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.47%. Comparing base (45f4894) to head (8203f99).
⚠️ Report is 81 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #169      +/-   ##
==========================================
+ Coverage   83.33%   83.47%   +0.14%     
==========================================
  Files           7        7              
  Lines         588      593       +5     
  Branches      101      102       +1     
==========================================
+ Hits          490      495       +5     
  Misses         69       69              
  Partials       29       29              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@antonag32 antonag32 changed the title Draft: [IMP] t2d: Add support for vscode with devcontainer.json Draft: [IMP] t2d: Add support for vscode with devcontainer.json #158 Oct 6, 2022
@antonag32 antonag32 changed the title Draft: [IMP] t2d: Add support for vscode with devcontainer.json #158 Draft: [IMP] t2d: Add support for vscode with devcontainer.json Oct 6, 2022
@moylop260

Copy link
Copy Markdown
Collaborator

@moylop260 moylop260 closed this Aug 7, 2026
@moylop260
moylop260 deleted the devcontainer-anton branch August 7, 2026 22:49
moylop260 added a commit that referenced this pull request Aug 19, 2026
…son (#240)

Opt-in with the DEPLOYV_VSCODE=1 environment variable so vim/terminal
users do not pay the extra build time downloading VS Code artifacts:

- The Dockerfile pre-installs the VS Code server pinned to the commit of
  the local 'code' binary (falling back to the latest stable) and the
  extensions of templates/.vscode/extensions.json at build time, so
  attaching VS Code to the container does not install anything live
- Generate a .devcontainer.json next to the Dockerfile pointing to the
  image built by 10-build.sh so VS Code offers 'Reopen in Container'

Based on the idea of #169 by @antonag32
Related to #158
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants