Loading...
 

Kint

Debugging utility to speed up Tiki developers' process


As developers, we already know that using the right debugging tools can really make it easier to track bugs or improve the codebase. See also GlitchTip.

Why do we need Debugging?

  • Reports an error immediately so that we can detect the errors in it’s earlier stage.
  • It assists the developer in reducing useless and distracting information.


Kint - a modern and powerful PHP debugging helper

What is it?

Kint for PHP is a tool designed to present your debugging data in the absolutely best way possible.
In other words, think of Kint as a modern tool to help you track your code with more flexibility.

We are already familiar with some PHP debugging functions like var_dump(), debug_backtrace(), get_defined_vars(), etc. But what if you got a magic toolbox that will wrap up all the essentials interface to debug your code?

In brief, Kint is a de facto addition to your development toolbox.

How to use Kint to Debug in Tiki Development? 


Don't worry about long installation, importing, or namespacing... The developer's community at Tiki decided to bundle Kint With newly tiki releases so it will make it easy to call all Kint functions at glance. https://gitlab.com/tikiwiki/tiki/-/commit/feb553ff5cba282c5c62d811ae58a15120923867

exclaim Remember!
Before using Kint utility functions you have to access your shell and enable the developer mode.
Once you have access to your console interface, please run the following command from the root folder:
php console.php dev:configure

If you want to know more about the command please run

php console.php help dev:configure

What's next?

  • You can use Kint in any PHP code from Tiki, for example:
Usage of Kint::trace in any PHP file
Copy to clipboard
Kint::trace(); // Dump a backtrace

and you can get informations like:

Capture D’écran 2022 07 13 145740

  • You can run Smarty Kint Modifier within the smarty template files: you sometimes run a case where you want to dump your variables from tpl files, with the "d" modifier available in Tiki ( alias for Kint::dump()) you can backtrace your variables' metadata :

the syntax is :

a given tpl file code snippet
Copy to clipboard
{$varName|d}

example of output:
Capture D’écran 2022 07 13 144700
As you can see we have even got a bunch of informations about the variable


The kint full documentation can be read at Kint Docs

Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.

Accessibility (WAI & 508)
Accounting
Administration
Ajax
Articles & Submissions
Backlinks
Banner
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Calendar
Category
Chat
Comment
Communication Center
Consistency
Contacts Address book
Contact us
Content template
Contribution
Cookie
Copyright
Credits
Custom Home (and Group Home Page)
Database MySQL - MyISAM
Database MySQL - InnoDB
Date and Time
Debugger Console
Diagram
Directory (of hyperlinks)
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
DogFood
Draw -superseded by Diagram
Dynamic Content
Preferences
Dynamic Variable
External Authentication
FAQ
Featured links
Feeds (RSS)
File Gallery
Forum
Friendship Network (Community)
Gantt
Group
Groupmail
Help
History
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
jQuery
Kaltura video management
Kanban
Karma
Live Support
Logs (system & action)
Lost edit protection
Mail-in
Map
Menu
Meta Tag
Missing features
Visual Mapping
Mobile
Mods
Modules
MultiTiki
MyTiki
Newsletter
Notepad
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
Organic Groups (Self-managed Teams)
Packages
Payment
PDF
Performance Speed / Load / Compression / Cache
Permission
Poll
Profiles
Quiz
Rating
Realname
Report
Revision Approval
Scheduler
Score
Search engine optimization (SEO)
Search
Security
Semantic links
Share
Shopping Cart
Shoutbox
Site Identity
Slideshow
Smarty Template
Social Networking
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Staging and Approval
Stats
Survey
Syntax Highlighter (Codemirror)
Tablesorter
Tags
Task
Tell a Friend
Terms and Conditions
Theme
TikiTests
Federated Timesheets
Token Access
Toolbar (Quicktags)
Tours
Trackers
TRIM
User Administration
User Files
User Menu
Watch
Webmail and Groupmail
WebServices
Wiki History, page rename, etc
Wiki plugins extends basic syntax
Wiki syntax text area, parser, etc
Wiki structure (book and table of content)
Workspace and perspectives
WYSIWTSN
WYSIWYCA
WYSIWYG
XMLRPC
XMPP




Useful Tools