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



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

*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.

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:

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

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

// 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

Search Wishes (subject only) [Toggle]

Keywords [Toggle]

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 7.x
Administration
Ajax 2.x
Articles & Submissions
Backlinks
Banner
Batch 6.x
BigBlueButton audio/video/chat/screensharing (5.x)
Blog
Bookmark
Browser Compatibility
Calendar
Category
Chat
Comment
Communication Center
Consistency
Contacts Address book
Contact us
Content template
Contribution 2.x
Cookie
Copyright
Credits 6.x
Custom Home (and Group Home Page)
Database MySQL - MyISAM
Database MySQL - InnoDB
Date and Time
Debugger Console
Directory (of hyperlinks)
Documentation link from Tiki to doc.tiki.org (Help System)
Docs 8.x
DogFood
Draw 7.x
Dynamic Content
Preferences
Dynamic Variable
External Authentication
FAQ
Featured links
Feeds (RSS)
File Gallery
Forum
Friendship Network (Community)
Group
Help
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
jQuery
Kaltura video management
Karma
Live Support
Logs (system & action)
Lost edit protection
Mail-in
Map
Menu
Meta Tag
Missing features
Visual Mapping 3.x
Mobile Tiki and Voice Tiki
Mods
Module
MultiTiki
MyTiki
Newsletter
Notepad
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
Payment 5.x
Performance Speed / Load / Compression / Cache
Permission
Poll
Profiles
Quiz
Rating
Report
Score
Search engine optimization (SEO)
Search
Security
Semantic links 3.x
Shopping Cart 5.x
Shoutbox
Site Identity
Slideshow
Smarty Template
Social Networking
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Staging and Approval
Stats
Survey
Syntax Highlighter (Codemirror)
Tags 2.x
Task
Tell a Friend, alert + Social Bookmarking
TikiTests 2.x
Theme
Toolbar (Quicktags)
Trackers
TRIM
User Administration
User Files
User Menu
Watch
WebHelp
Webmail and Groupmail
WebServices 3.x
Wiki 3D
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 4.x
WYSIWTSN 4.x
WYSIWYCA
WYSIWYG 2.x
XMLRPC




Spaces [Toggle]