Loading...
 
 Note
This page is to document "what Tiki should do". For feature documentation (what Tiki does), please see corresponding page on doc site

Debugger Console

See also Kint

RatingSubjectSubmitted byImportanceEasy to solve?PriorityCategoryVolunteered to solveCreatedLastModifComments
(0) Bad contrast for debug console using the default themeBernard Sfez / Tiki Specialist410 easy40
  • Usability
  • Less than 30-minutes fix
  • Easy for Newbie Dev
2018-11-252018-11-282
Bsfez-28 Nov 18
(0) smarty {debug} function gives PHP error "E_USER_WARNING"sinnlos735
  • Error
2009-06-262009-08-180
(0) Debugger console no longer appearsluciash d' being 🧙735
  • Regression
2014-01-292014-01-300
(0) debugger console breaks the admin panelspkdille25
  • Error
2010-02-132010-05-060



Also see {debug} which can be used in Smarty Templates as described in template tricks.

General Description

For a TikiAdmin this tool is a great first step towards making Tiki as easy to debug as it is to extend and modify!

Overview

When processing a page, your code can send output to the debug console with commands such as $debugger->msg("your message"). This writes the output to the debugconsole which you can then view by displaying the console.

When executing debugging commands, the page is re-loaded with the output of the debugging commands written to the debugconsole. This may pose problems for pages which are processing user input, uploading files, or that crash and do not return.

The debug console is embedded within a div class="debugconsole" id="debugconsole" which is turned on by clicking on the link to toggle the console. Careful inspection will note that the footer.tpl includes tiki-debug_console.php which handles the processing after most of the rest of the page has already executed.

General Notes
  • Enable debugger console by selecting checkbox on Admin -> Features -> Administration Features.
  • Debugger can be extended with commands and/or interface extensions (tabs).
  • Every command in debugger is a PHP class.
  • Sources lib/debug
  • Search for debug-command_*.php it is filenames mask... for debugger commands
  • one command one class one file


Key Function and sub-features

General info

Copy to clipboard
*help Display list of commands or help for specified command (help print for example) *tikitables Show list of Tiki tables in DB schema *features Show features on/off state *perm Show current permissions in a convenient way *print Print PHP variable. Indexes are OK. *slist Display list of Smarty variables. Better to specify partial name or very long list of vars will return. *sprint Print Smarty variable *watch Manage variables watch list *sql Exec SQL query on Tiki DB


How to extend debugger

Look for example skeleton lib/debug/debugger-command_test.php

Related Links


Typical Uses

Debug messages on console

It is possible to print debug info to special debug tab called 'Debug messages' during page generation. It is possible from PHP and Smarty as well.

Copy to clipboard
Dump Smarty variable from template: {var_dump var=left_modules} Dump Smarty variable from template using modificator: {$description|str_replace:"\n":"<br />"|dbg}

Of couse modificator dbg can be used more than once:

Copy to clipboard
{$description|dbg|str_replace:"\n":"<br />"|dbg}

... so you will get 2 messages before and after modification of $description.

Copy to clipboard
// PHP code global $debugger; // Print message $debugger->msg('Value of $myvar = "'.$myvar.'"'); // Print variable $debugger->var_dump('$myvar');


Case Studies


Bugs

Non command-line commands should not print help. — Fixed in CVS.

Support Requests

We need more examples of the commands that are being passed here...

TikiTeam

zaufi

For more information

lookup sources lib/debug


alias

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