Debug http://drupal8.ovh/en/tags/debug en SimpleTest : Running PHPUnit tests from command line http://drupal8.ovh/en/tutoriels/269/simpletest-running-phpunit-tests <span class="field field--name-title field--type-string field--label-hidden">SimpleTest : Running PHPUnit tests from command line</span> <div class="clearfix text-formatted field field--name-field-question field--type-text-long field--label-above"> <div class="field__label">Question</div> <div class="field__item"><p>How to test drupal 8 application using command line (without SimpleTest Admin interface) ?</p> </div> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/en/users/editor" typeof="schema:Person" property="schema:name" datatype="">editor</span></span> <span class="field field--name-created field--type-created field--label-hidden">Wed, 12/07/2016 - 17:39</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><h2>Initialisation - Create link to the script (Optional).</h2> <p><code>ln -s core/scripts/run-tests.sh ~/bin</code></p> <h2>Run Test and open rest in web browser.</h2> <p><code>php core/scripts/run-tests.sh --browser --class "Drupal\YOUR_MODULE\Tests\JustTest"</code></p> <h2>Run Test and display result in the terminal.</h2> <p><code>php core/scripts/run-tests.sh --verbose --color --class "Drupal\YOUR_MODULE\Tests\JustTest"</code></p> <h2>Run test using a separate SqLite Database.</h2> <p><code>php core/scripts/run-tests.sh --verbose --sqlite test.sqlite --class "Drupal\YOUR_MODULE\Tests\JustTest"</code></p> <h2>Run test verbose mode and open in web browser.</h2> <p><code>php core/scripts/run-tests.sh --verbose --browser --class "Drupal\YOUR_MODULE\Tests\JustTest</code></p> <h2>Clean up Database Tables.</h2> <p><code>php core/scripts/run-tests.sh --verbose --clean</code></p> <p> </p> <p> </p> <p>Link : https://www.drupal.org/docs/8/phpunit/running-phpunit-tests</p> </div> <div class="field field--name-field-tags field--type-entity-reference field--label-inline clearfix"> <h3 class="field__label inline">Tags</h3> <ul class="links field__items"> <li><a href="/en/tags/drupal-8" hreflang="en">Drupal 8</a></li> <li><a href="/en/tags/code" hreflang="en">Code</a></li> <li><a href="/en/tags/debug" hreflang="en">Debug</a></li> <li><a href="/en/tags/tests" hreflang="en">Tests</a></li> </ul> </div> <div class="field field--name-field-related-contents field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><a href="/en/tutoriels/123/simpletest-drupal-8" hreflang="en">SimpleTest With Drupal 8</a></div> </div> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=269&amp;2=comment&amp;3=comment" token="HsrgLvKjNiIQag4zn86arzYiVNpY9hN-qBnGmznvEHA"></drupal-render-placeholder> </section> Wed, 07 Dec 2016 16:39:01 +0000 editor 269 at http://drupal8.ovh http://drupal8.ovh/en/tutoriels/269/simpletest-running-phpunit-tests#comments XDebug - Install and configure with NetBeans http://drupal8.ovh/en/tutoriels/109/xdebug-install-and-configure-netbeans <span class="field field--name-title field--type-string field--label-hidden">XDebug - Install and configure with NetBeans</span> <div class="clearfix text-formatted field field--name-field-question field--type-text-long field--label-above"> <div class="field__label">Question</div> <div class="field__item"><p>How to install and configure Xdebug With an IDE (NetBeans, PHPStome ...) ?</p> </div> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/en/users/editor" typeof="schema:Person" property="schema:name" datatype="">editor</span></span> <span class="field field--name-created field--type-created field--label-hidden">Sun, 01/24/2016 - 12:23</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Step 1. Install Xdebug<br /> If not already ainstalled, Install Xdebug (I'ts already on the package WAML, LAMP, MAMP)<br /> In Linux Debian/Ubuntu/Mint<br /><code># sudo apt-get install php5-xdebug</code></p> <p>Step 2. Configure the server<br /> Open php.ini and add:<br /><code>[xdebug]<br /> ;The path to the xdebug extention , If not already added<br /> ;zend_extension=/usr/lib/php5/20090626/xdebug.so<br /> ;zend_extension=xdebug.so</code></p> <p><code>xdebug.remote_enable=on<br /> xdebug.remote_handler="dbgp"<br /> xdebug.remote_port=9000</code><br /><code>;IP of your debuging computer (127.0.0.1 if you use a local server)</code><br /><code>;NOTE : Ff you use a VirtualBox VM, Probably you can use the 127.0.0.1 IP<br /> xdebug.remote_host=<strong>127.0.0.1</strong><br /> ;A key to identify your IDE<br /> xdebug.idekey="<strong>netbeans-xdebug</strong>"<br /> xdebug.remote_connect_back=1</code></p> <p>Step 3. Configure your IDE<br /> On Netbeans, Project properties-&gt;Run Configuration -&gt; Project Url (Set project URL</p> <p>Step 4. Configure web browser<br /> - Install xdebug extention on your web browser (On FireFox / Chrome ...)<br /> - Configure with your IDE Key :<strong> netbeans-xdebug</strong></p> <p>Finally, (on NetBeans)</p> <ul><li>Add a BreackPoint (where you want !!!)</li> <li>Run your project in debug mode (<strong>Ctrl + F5</strong>)</li> <li>You can: <ul><li>View Variables</li> <li>Step over ( <strong>F8</strong> )</li> <li>Step Into ( <strong>F7</strong> )</li> <li>Step Out ( <strong>Ctrl + F7</strong> )</li> <li>Run to cursor ( <strong>F4</strong> )</li> <li>Continue ( <strong>F5</strong> )</li> </ul></li> </ul></div> <div class="field field--name-field-tags field--type-entity-reference field--label-inline clearfix"> <h3 class="field__label inline">Tags</h3> <ul class="links field__items"> <li><a href="/en/tags/server" hreflang="en">Server</a></li> <li><a href="/en/tags/debug" hreflang="en">Debug</a></li> </ul> </div> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=109&amp;2=comment&amp;3=comment" token="sSjkqxh7GTkyg29tXkaFAnNK7zYThBjULinxph65WyE"></drupal-render-placeholder> </section> Sun, 24 Jan 2016 11:23:09 +0000 editor 109 at http://drupal8.ovh http://drupal8.ovh/en/tutoriels/109/xdebug-install-and-configure-netbeans#comments Debug and Display errors. PHP Apache Mysql Xdebug http://drupal8.ovh/en/tutoriels/106/debug-and-display-errors-php-apache-mysql-xdebug <span class="field field--name-title field--type-string field--label-hidden">Debug and Display errors. PHP Apache Mysql Xdebug</span> <div class="clearfix text-formatted field field--name-field-question field--type-text-long field--label-above"> <div class="field__label">Question</div> <div class="field__item"><p>Easy ways to display error and debug PHP Apache Mysql, with or without Xdebug</p> </div> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/en/users/editor" typeof="schema:Person" property="schema:name" datatype="">editor</span></span> <span class="field field--name-created field--type-created field--label-hidden">Mon, 01/18/2016 - 10:24</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Step 1.<br /> Check apache error log (use tail to show in real time)<br /><code># tail -f /var/log/apache2/error.log</code></p> <p>Step 2 : <br /> Check MySQL database connection using <code><strong>mysql -uusername -ppassword</strong></code></p> <p> </p> <p>Note : Install Xdebug (if not already installed) to debug easily</p> </div> <div class="field field--name-field-tags field--type-entity-reference field--label-inline clearfix"> <h3 class="field__label inline">Tags</h3> <ul class="links field__items"> <li><a href="/en/tags/server" hreflang="en">Server</a></li> <li><a href="/en/tags/shell" hreflang="en">Shell</a></li> <li><a href="/en/tags/debug" hreflang="en">Debug</a></li> </ul> </div> <div class="field field--name-field-related-contents field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><a href="/en/tutoriels/106/debug-and-display-errors-php-apache-mysql-xdebug" hreflang="en">Debug and Display errors. PHP Apache Mysql Xdebug</a></div> </div> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=106&amp;2=comment&amp;3=comment" token="EaHgcjlI8ZFeDvgXtE-AeMHOuxtkBvHscvUH7uWWCkI"></drupal-render-placeholder> </section> Mon, 18 Jan 2016 09:24:39 +0000 editor 106 at http://drupal8.ovh http://drupal8.ovh/en/tutoriels/106/debug-and-display-errors-php-apache-mysql-xdebug#comments