ERPNext Conference 2019* ERPNext.com Blog

How to add debugger in frappe?


#1

I want to add debugger so how to add that please help?


#2

Server side you can use:

frappe.throw("What went wrong")

or

frappe.log_error("Write this to error log")

And client side you can use:

window.alert("sometext");

or

console.log("got it");

#3

Thank you so much


#4

There’s also frappe.msgprint('debug message') for gentler debug prints on the backend.


#5

is it for development or preoduction??


#6

It works for production configuration with developer_mode enabled. I didn’t test it on the pure production server yet.


#7

ok thanks for the reply


#8

it works there also