silverstripe-framework/docs/en/02_Developer_Guides/07_Debugging/index.md
Aaron Carlino 6888901468
NEW: Update docs to be compliant with Gatsby site (#9314)
* First cut

* Temporarily disable composer.json for netlify build

* POC

* New recursive directory query, various refinements

* Fix flexbox

* new styled components plugin

* Apply frontmatter delimiters

* Mobile styles, animation

* Search

* Redesign, clean up

* Nuke the cache, try again

* fix file casing

* Remove production env file

* ID headers

* Move app to new repo

* Add frontmatter universally

* Hide children changelogs

* Add how to title

* New callout tags

* Revert inline code block change

* Replace note callouts

* Fix icons

* Repalce images

* Fix icon

* Fix image links

* Use proper SQL icon
2019-11-18 17:58:33 +13:00

1.2 KiB

title summary icon
Debugging Learn how to identify errors in your application and best practice for logging application errors. bug

Debugging

SilverStripe can be a large and complex framework to debug, but there are ways to make debugging less painful. In this guide we show the basics on defining the correct Environment Type for your application and other built-in helpers for dealing with application errors.

[CHILDREN]

Performance

See the Profiling documentation for more information on profiling SilverStripe to track down bottle-necks and identify slow moving parts of your application chain.

Debugging Utilities

The Debug class contains a number of static utility methods for more advanced debugging.

use SilverStripe\Dev\Debug;
use SilverStripe\Dev\Backtrace;

Debug::show($myVariable);
// similar to print_r($myVariable) but shows it in a more useful format.

Debug::message("Wow, that's great");
// prints a short debugging message.

Backtrace::backtrace();
// prints a calls-stack

API Documentation