Ninext : Debug Tracer
Hello everyone,
For some time, I wanted to offer you a possibility to debug your programs. I am happy to present you a first debugging tool. It's simply a tracer to display the messages coming from the debug() function of Ninox.
To make this possible, I also had to improve the Ninext popup which can now display FieldsInscpector and DebugTracer. Also, you can now access it with a new button that appears only in administrator mode.
To use it, just put the debug function in your script. The message will be displayed in the "Debug tracer" popup when the code is executed:
In addition to debug(), you can also use the string(), typeof() and debugValueInfo() functions to get more information about your data:
var mySelection := select Customer where 'First Name' like "a";
debug(string(mySelection));
debug(typeof(mySelection));
debug(debugValueInfo(mySelection));
To activate the debugTracer, just add this code to the AfterOpenTriger option (learn more about NinextProject) :
var code := http("GET", "https://raw.githubusercontent.com/JacquesTur/Ninext/main/loadModules.html").result;
dialog("Ninext intialization", "<script>
window.exConfigLoadModules = {
completion: false,
badges: true,
evalJS: true,
viewEvent: true,
buttonEvent : true,
fieldsInspector: true,
nativeJS: true,
tableView: true,
debugTracer : true, autoCloseDialog: false
};
</script>" + code, ["close"])
I hope this will help you to debug your code and understand better what is going on in it.
And until then, I wish you all a merry Christmas .
10 replies
-
As always, Jacques TUR you've been great again. Thanks for all the effort and time you put into this!
Happy holidays everyone !
-
Another gift from Jacques TUR (Christmas gift this time). Thanks.
Warmest wishes to everyone this holiday season!
-
Thanks a lot for the warm wishes and the additions to Ninext. Hope you have a warm and sweet Christmas.
-
Right on time for Christmas ! thank you Jacques TUR this was a missing tool and again you made it !
-
Only played around for some weeks with ninox and I love it. The MVP is almost done. Thank to Jacques TUR and all the others for improving ninox <3 .
-
Good evening everyone,
I have just updated debugTracer (Ninext version 2.1.8). It now allows to scan all local variables declared before the debug() statement:
This now allows you to better see and understand what is happening in your code at runtime. Just place a debug() statement in your code:
Then observe the contents of the variables and records in Debug Tracer as the code is executed in its environment. You can see the contents of the records and their related tables :
Beware, the display of varialbes is greedy in system resources and can slow down the database significantly. It is therefore only active if the debugTracer popup is displayed.
Enjoy -
I have a problem. When I call the debug() function with the current Ninext version 2.1.23 beta, I do not get any output in the Debug Tracer. If I provide a value to the debug() function as shown in the examples above, I get an error: Function debug takes 0 parameters - given: 1.
We are using an OnPrem Ninox version with server v 3.8.16.
Content aside
-
2
Likes
- 1 yr agoLast active
- 10Replies
- 521Views
-
8
Following