Responsive web Framework

DOCUMENTATION

Debug

Routines make it easier to identify errors or problems in code.

NOT AVAILABLE FOR TINY SCREENS

(minimum width: 480px)

Purpose

This tool is useful for identifying errors in code, as well as knowing values in the different variables throughout the operation.
Although there are already functions within the same language that comply with said purpose, it focuses on displaying the information on the screen, supported by visual characteristics that allow a more efficient identification of data.

Description

The library consists of four functions:

beginDebug()
No parameters required. Initializes the web page and displays the current information, such as the environment variables, parameters received and stored cookies. It is only used for the first time.
endDebug()
No parameters required. Function inverse of the previous one, closes the web page and creates a link for its second execution.
shout(char,data)
It uses two parameters, the first one (char) is a character that indicates the type of message (notification) or value (variable) to display and the second (data) the message or variable to show:
  • f   Function (notification)
  • p   Section (notification)
  • i   Informative (notification)
  • e   Error (notification)
  • q   Query (notification)
  • r   Result (notification)
  • s   System (notification)
  • @   Array (variable array)
  • %   Hash (variable hash)
  • ?   Structure (complex or unknown variable)
obscure(str)
It receives a string, but hides several of the data. Used to display passwords or security data.

Use

The use of this library goes hand in hand with the declaration of a variable called $bool_DEBUG that can have the value of 1 or 0; Which activates throughout the code various functions that allow the display of information on the screen.

See it! icon execute code