Debug Tools
Overview
Tabulator includes a range of debug tools that will console log various table actions so you can see how your code is affecting table functionality.
Warnings
Tabulator provides a range of console warnings to let you know when there may be a misconfiguration in your table setup. If you want to suppress these warnings, there are a series of table setup options that you can use.
Invalid Options Warning
Enabled by default, this will provide a console warning if you are trying to set an option on the table that does not exist. With the new optional modular structure this is particularly valueable as it will prompt you if you are trying to use an option for a module that has not been installed
You can disable this using the debugInvalidOptions option in the table constructor
var table = new Tabulator("#example-table", { debugInvalidOptions:false, //disable option warnings });
Invalid Component Functions Warning
Enabled by default, this will provide a console warning if you are trying to call a function on a component that does not exist. With the new optional modular structure this is particularly valueable as it will prompt you if you are trying to use an function on a component for a module that has not been installed
You can disable this using the debugInvalidComponentFuncs option in the table constructor
var table = new Tabulator("#example-table", { debugInvalidComponentFuncs:false, //disable component function warnings });
Initialization Warning
Enabled by default, this will provide a console warning if you try and call a function on the table before it has been initialized.
You can disable this using the debugInitialization option in the table constructor
var table = new Tabulator("#example-table", { debugInitialization:false, //disable option warnings });
Deprecation Warning
Enabled by default, this will provide a console warning if you attempt to use a setup option that has been deprecated. Where possible an alternative option may be suggested.
You can disable this using the debugDeprecation option in the table constructor:
var table = new Tabulator("#example-table", { debugDeprecation:false, //disable deprecation warnings });
Monitoring
When bulding your table it can sometimes be helpful to understand what internal and external events are fired by the table and when. Tabulator comes complete with some built in monitoring tools that let you dump out a log from the event bus to show what is happening inside the table.
Monitor External Event Bus
The debugEventsExternal option will create a console log for every external event that is fired so you can gain an understanding of which events you should be binding to.
var table = new Tabulator("#example-table", { debugEventsExternal:true, //console log external events });
Passing an array of event keys into this option will restrict the console logging to just the events you want to see.
var table = new Tabulator("#example-table", { debugEventsExternal:["dataLoading", "dataLoaded"], });
Monitor Internal Event Bus
The debugEventsInternal option will create a console log for every internal event that is fired so you can gain an understanding of which events you should be subscribing to in your modules.
var table = new Tabulator("#example-table", { debugEventsInternal:true, //console log internal events });
Passing an array of event keys into this option will restrict the console logging to just the events you want to see.
var table = new Tabulator("#example-table", { debugEventsInternal:["data-loading", "data-loaded"], });
Warning Tabulator fires a huge number of internal events, running with this enabled will slow the table down considerably, and you should ensure you are only running this option with a table containing a small amount of data