Visual Studio Code for Odoo Development
Jeevachaithanyan Sivanandan
[ Python + PHP + JavaScript ] - Software Engineer / Frontend Developer / Full Stack Developer
A simple VSCode debugger for Odoo in MS Windows OS. VS Code's launch.json file acts as the configuration hub for your debugging sessions. It specifies how the debugger should start and connect to your application. Here's the configuration we'll use for Odoo 17:
In the .vscode folder (create it if it doesn't exist), create a file named launch.json and paste the code below
{
"version": "0.2.0",
"configurations": [
{
"name": "Odoo ",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}\\odoo\\odoo-bin",
"console": "integratedTerminal",
"args": ["-c", "${workspaceFolder}\\odoo\\odoo.conf", "--dev=all"],
"env": {
"PYTHONPATH": "${workspaceFolder}"
},
"cwd": "${workspaceFolder}/odoo" //Crucial addition for working directory
}
]
}