Setup Frappe Debug in VS Code

Sharad Bhandari
2 min readNov 7, 2023

In the intricate landscape of enterprise resource planning (ERP) solutions, Frappe ERPNext stands out as a robust, open-source platform designed to streamline and optimize business operations. While its functionality is extensive and powerful, like any complex software, it can encounter glitches or unexpected behavior, necessitating the need for a systematic approach to identify and resolve issues effectively. This is where the art of debugging comes into play.

Debugging in Frappe ERPNext is not just about fixing errors; it’s a structured process that requires a combination of technical skill, critical thinking, and a deep understanding of the framework. It involves unraveling complexities, isolating issues, and systematically troubleshooting to ensure the system runs seamlessly.

In this comprehensive guide, we’ll delve into the fundamental principles of debugging in Frappe ERPNext. From understanding common pitfalls to employing various tools and techniques, this guide aims to equip developers, administrators, and users with the knowledge needed to navigate through troubleshooting challenges effectively.

Whether you’re a seasoned developer or a newcomer to Frappe ERPNext, this guide will serve as a valuable resource, shedding light on the intricacies of debugging and empowering you to conquer issues with confidence. Let’s embark on a journey to demystify the art of debugging within the realm of Frappe ERPNext.

Procfile

redis_cache: redis-server config/redis_cache.conf
redis_queue: redis-server config/redis_queue.conf
# web: bench serve - port 8000
socketio: /home/jarvis/.nvm/versions/node/v18.17.1/bin/node apps/frappe/socketio.js
watch: bench watch
schedule: bench schedule
worker: bench worker 1>> logs/worker.log 2>> logs/worker.error.log

VS Code Debugging file lunch.json

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Bench Runner",
"type": "python",
"request": "launch",
"python": "${workspaceFolder}/env/bin/python",
"program": "${workspaceFolder}/apps/frappe/frappe/utils/bench_helper.py",
"args": [
"frappe", "serve", "--port", "8000",
"--noreload", "--nothreading"
],
"cwd": "${workspaceFolder}/sites",
"env": {
"DEV_SERVER": "1"
}
}

]
}

Happy Hacking !

--

--

Sharad Bhandari
0 Followers

GEEK, SYSTEM Researcher, Developer and Hacker As well …These are my Identity …