Enhanced Tracebacks for Developers

Hi Developers, for anyone that have difficulties to debug frappe in the backend, I’m publishing a small app that will collect all tracebacks in the server for you, this app is usefull to get detailed tracebacks in the async routines.

The app is disponible here GitHub - techmaxsolucoes/frappe_traceback_collector: A awesome way of analyse frappe tracebacks!

I expect that it can be helpfull for someone apart from me!

1 Like

Thanks @max_morais_dmm!

@max_morais_dmm - Nice, let us add this in standard frappe. This will be very useful.

@rmehta, let me close the second part of this and we add it as a standard!

I want get detailed reports from JavaScript too!

I was thinking that in order to provide help to developers would be interesting if they share at least one report like this, sometimes I invest a lot of time trying and re trying with stretches of code, with users in gitter, why they dont have idea about how to explain what is going wrong.

@max_morais_dmm great. I think I need to sit down and take some time to document scripting of forms.

Let me know if you need any help.

@rmehta my last commit in this app, introduce the Stack report, but in JavaScript it will be hard to get the same detail level of Traceback reports, checking arguments and local variables!

It’s fully possible, but requires a prototype for Function constructor, and for interact with low-level objects in JavaScript it require be loaded before at all! Currently it’s not possible in frappe, so I’m going with non detailed level of Reports to JavaScript Stack.

About the documentation of Scripting forms, will be awesome have it in hands, but all client side requires a special attention! We have unespected behaviors, like the case of cur_frm.add_fetch that we discussed in the past in a thread created by Sofia, most recently I, Anand and Aditya have discussed in gitter about a hack to refresh a single field in the grid.

I guess that before your team, I’m one that get a good understanding of frappe and ERPNext at all, but it requires dedication to follow what is the good and bad parts of the project. Currently, I guess that the unique part that requires more care is the JavaScript code.

One sample about what I’m talking is this frappe_traceback_collector/traceback.js at master · techmaxsolucoes/frappe_traceback_collector · GitHub, currently I made a patch in JavaScript to enable the loading of the html templates using assets.

@max_morais_dmm I agree with all you said.

Form scripting has not been given enough love. And the main reason is that we are stuck with all kinds of legacy scripts. Infact form.js is one of the last files stuck in the legacy/ folder in js.

@rmehta
I’m and the app is ready to discuss about they integration in frappe.

@max_morais_dmm send a pull-request.