From 03d31b9c336366ca5e9e26ebd9e6f581652c5242 Mon Sep 17 00:00:00 2001 From: provokateurin Date: Wed, 7 Feb 2024 09:20:07 +0100 Subject: [PATCH] fix(dev): Remove duplicate debugging page Signed-off-by: provokateurin --- .../getting_started/debugging.rst | 89 ------------------- developer_manual/getting_started/index.rst | 1 - 2 files changed, 90 deletions(-) delete mode 100644 developer_manual/getting_started/debugging.rst diff --git a/developer_manual/getting_started/debugging.rst b/developer_manual/getting_started/debugging.rst deleted file mode 100644 index c13072440..000000000 --- a/developer_manual/getting_started/debugging.rst +++ /dev/null @@ -1,89 +0,0 @@ -========= -Debugging -========= - -Debug mode ----------- - -When debug mode is enabled in Nextcloud, a variety of debugging features are enabled - see debugging documentation. Set ``debug`` to ``true`` in :file:`/config/config.php` to enable it: - -.. code-block:: php - - true, - ... configuration goes here ... - ); - - -Identifying errors ------------------- - -Nextcloud uses custom error PHP handling that prevents errors being printed to Web server log files or command line output. Instead, errors are generally stored in Nextcloud's own log file, located at: :file:`/data/nextcloud.log` - - -Debugging variables -------------------- - -You should use exceptions if you need to debug variable values manually, and not alternatives like trigger_error() (which may not be logged). - -e.g.: - -.. code-block:: php - - - -not: - -.. code-block:: php - - - -To disable custom error handling in Nextcloud (and have PHP and your Web server handle errors instead), see Debug mode. - - -Using a PHP debugger (XDebug) ------------------------------ - -Using a debugger connected to PHP allows you to step through code line by line, view variables at each line and even change values while the code is running. The de-facto standard debugger for PHP is XDebug, available as an installable package in many distributions. It just provides the PHP side however, so you will need a frontend to actually control XDebug. When installed, it needs to be enabled in :file:`php.ini`, along with some parameters to enable connections to the debugging interface: - -.. code-block:: ini - - zend_extension=/usr/lib/php/modules/xdebug.so - xdebug.remote_enable=on - xdebug.remote_host=127.0.0.1 - xdebug.remote_port=9000 - xdebug.remote_handler=dbgp - -XDebug will now (when activated) try to connect to localhost on port 9000, and will communicate over the standard protocol DBGP. This protocol is supported by many debugging interfaces, such as the following popular ones: - -- vdebug - Multi-language DBGP debugger client for Vim -- SublimeTextXdebug - XDebug client for Sublime Text -- PHPStorm - in-built DBGP debugger - -For further reading, see the XDebug documentation: https://xdebug.org/docs/remote - -Once you are familiar with how your debugging client works, you can start debugging with XDebug. To test Nextcloud through the web interface or other HTTP requests, set the ``XDEBUG_SESSION_START`` cookie or POST parameter. Alternatively, there are browser extensions to make this easy: - -- The Easiest XDebug (Firefox): https://addons.mozilla.org/en-US/firefox/addon/the-easiest-xdebug/ -- XDebug Helper (Chrome): https://chrome.google.com/extensions/detail/eadndfjplgieldjbigjakmdgkmoaaaoc - -For debugging scripts on the command line, like ``occ`` or unit tests, set the ``XDEBUG_CONFIG`` environment variable. - - -Debugging JavaScript --------------------- - -By default all JavaScript files in Nextcloud are minified (compressed) into a single file without whitespace. To prevent this, see Debug mode. - - -Debugging HTML and templates ----------------------------- - -By default Nextcloud caches HTML generated by templates. This may prevent changes to app templates, for example, from being applied on page refresh. To disable caching, see Debug mode. - - -Using alternative app directories ---------------------------------- - -It may be useful to have multiple app directories for testing purposes, so you can conveniently switch between different versions of applications. See the configuration file documentation for details. diff --git a/developer_manual/getting_started/index.rst b/developer_manual/getting_started/index.rst index 3eeab21ec..70d0afb69 100644 --- a/developer_manual/getting_started/index.rst +++ b/developer_manual/getting_started/index.rst @@ -8,4 +8,3 @@ Getting started development_process devenv codingguidelines - debugging