# Module: `gears.debug`

Utility functions to make development easier.

### Info:

- Copyright: 2010 Uli Schlachter
- Originally authored by: Uli Schlachter
  (Full contributors list available on our github project)

## Static module functions

gears.debug.dump_return (data, tag, depth) -> string | Inspect the value in data. |
gears.debug.dump (data, tag, depth) | Print the table (or any other value) to the console. |
gears.debug.print_warning (message) | Print an warning message |
gears.debug.print_error (message) | Print an error message |
gears.debug.deprecate (see, args) | Display a deprecation notice, but only once per traceback. |
gears.debug.deprecate_class (fallback, old_name, new_name, args) -> table | Create a class proxy with deprecation messages. |

## Static module functions

🔗 gears.debug.dump_return (data, tag, depth) -> string
  Inspect the value in data.

  ### Parameters:

  Name |  | Type(s) | Description
  --- | --- | --- | ---
  data |  |  | Value to inspect.
  tag |  |  | The name of the value.
  depth | Optional | int | Depth of recursion.

  ### Returns:

  string A string that contains the expanded value of data.
🔗 gears.debug.dump (data, tag, depth)
  Print the table (or any other value) to the console.

  ### Parameters:

  Name |  | Type(s) | Description
  --- | --- | --- | ---
  data |  |  | Table to print.
  tag |  |  | The name of the table.
  depth | Optional | int | Depth of recursion.

🔗 gears.debug.print_warning (message)
  Print an warning message

  ### Parameters:

  Name |  | Type(s) | Description
  --- | --- | --- | ---
  message |  | string | The warning message to print.

🔗 gears.debug.print_error (message)
  Print an error message

  ### Parameters:

  Name |  | Type(s) | Description
  --- | --- | --- | ---
  message |  | string | The error message to print.

🔗 gears.debug.deprecate (see, args) · 2 signals
  Display a deprecation notice, but only once per traceback.

  This function also emits the `debug::deprecation` signal on the awesome global object. If the deprecated API has been deprecated for more than one API level, it will also send a non-fatal error.

  ### Parameters:

  Name |  | Type(s) | Description
  --- | --- | --- | ---
  see | Optional |  | The message to a new method / function to use.
  args |  | table | Extra arguments
  raw |  | boolean | Print the message as-is without the automatic context
  deprecated_in |  | integer | Print the message only when Awesome's version is equal to or greater than deprecated_in.

  Click to display more

  ### Emit signals:

  - `debug::deprecation` This is usually routed to stdout when the API is newly deprecated.
  - `msg` string The full formatted message.
  - `see` string A message provided by the caller.
  - `args` table Some extra context.
  - `debug::error` When the API has been deprecated for more than one API level.
  - `msg` string The full formatted message.
🔗 gears.debug.deprecate_class (fallback, old_name, new_name, args) -> table
  Create a class proxy with deprecation messages. This is useful when a class has moved somewhere else.

  ### Parameters:

  Name |  | Type(s) | Description
  --- | --- | --- | ---
  fallback |  | table | The new class.
  old_name |  | string | The old class name.
  new_name |  | string | The new class name.
  args | Optional | table | The name.
  deprecated_in | Optional | number | The version which deprecated this class.

  ### Returns:

  table A proxy class.

generated by LDoc 1.5.0