2

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

null
    • Ninox partner
    • RoSoft_Steven.1
    • 1 yr ago
    • Reported - view

    As always, Jacques TUR  you've been great again. Thanks for all the effort and time you put into this!

    Happy holidays everyone ! 🎆

    • Nick
    • 1 yr ago
    • Reported - view

    Another gift from Jacques TUR (Christmas gift this time). Thanks.

    Warmest wishes to everyone this holiday season! 🧑🎄

    • Fred
    • 1 yr ago
    • Reported - view

    Thanks a lot for the warm wishes and the additions to Ninext. Hope you have a warm and sweet Christmas.

    • buy
    • 1 yr ago
    • Reported - view

    Right on time for Christmas ! thank you Jacques TUR this was a missing tool and again you made it !

    • Cloud DevOps Fullstack Engineer
    • Martin_Mueller
    • 1 yr ago
    • Reported - view

    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 .

    • Ninox developper
    • Jacques_TUR
    • 1 yr ago
    • Reported - view

    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 😀

    • chris.8
    • 6 mths ago
    • Reported - view

    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.

      • Ninox developper
      • Jacques_TUR
      • 6 mths ago
      • Reported - view

       Could you show me the code you use and/or send me an example application?

      • chris.8
      • 6 mths ago
      • Reported - view

      Jacques TUR 

      I took your code with the corresponding error message.

       

      If I remove the "test" in debug(), I can save it, but nothing is displayed in the tracer when press the button.

      • Ninox developper
      • Jacques_TUR
      • 6 mths ago
      • Reported - view

       Sorry for the delayed response. I don't have version 3.8.16 of Ninox, which prevents me from running tests to replicate the issue. Do you have the ability to try this same app on another version of Ninox?
      If not, please contact me by email so we can schedule a video call to try and resolve this issue.

Content aside

  • 2 Likes
  • 6 mths agoLast active
  • 10Replies
  • 426Views
  • 7 Following