From 46461b64f99dceef0aa53c0a0fe35f6d11b44a3c Mon Sep 17 00:00:00 2001 From: danielspeicher <daniel.speicher@bitegra-solutions.de> Date: Wed, 15 Dec 2021 10:50:18 +0100 Subject: [PATCH] New documentation for development tools --- docs/composer/plugin/d4d/index.md | 1 + docs/dev_tools/index.md | 61 ++++++++++++++++++- docs/files/screenshots/configuration_add.png | 3 + docs/files/screenshots/configuration_done.png | 3 + .../screenshots/configuration_new_webpage.png | 3 + .../screenshots/settings_php_add_server.png | 3 + docs/files/screenshots/settings_php_debug.png | 3 + .../screenshots/settings_php_new_server.png | 3 + docs/files/screenshots/start_debug.png | 3 + 9 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 docs/files/screenshots/configuration_add.png create mode 100644 docs/files/screenshots/configuration_done.png create mode 100644 docs/files/screenshots/configuration_new_webpage.png create mode 100644 docs/files/screenshots/settings_php_add_server.png create mode 100644 docs/files/screenshots/settings_php_debug.png create mode 100644 docs/files/screenshots/settings_php_new_server.png create mode 100644 docs/files/screenshots/start_debug.png diff --git a/docs/composer/plugin/d4d/index.md b/docs/composer/plugin/d4d/index.md index bef8b96..5f4bfa6 100644 --- a/docs/composer/plugin/d4d/index.md +++ b/docs/composer/plugin/d4d/index.md @@ -104,6 +104,7 @@ Note that Solr, Node and Varnish are not enabled by default. See the [customizat ### PHP Debugging By default, PHP is configured with XDebug being enabled and you should check the instructions for your IDE on how to get started with a debugging session. +For the IDE's IntelliJ and PHPStorm from [Jetbrains](https://jetbrains.com) you find an instruction [here](../../../dev_tools/index.md#debugging-drupal-code). ### Watch the logs diff --git a/docs/dev_tools/index.md b/docs/dev_tools/index.md index 2d9c358..8223adb 100644 --- a/docs/dev_tools/index.md +++ b/docs/dev_tools/index.md @@ -1,6 +1,63 @@ --- -title: Development Tools +title: Developer Tools tags: - documentation - tools ---- \ No newline at end of file +--- +# Developer Tools + +## IDE + +We use the IDE's IntelliJ and PHPStorm from [Jetbrains](https://jetbrains.com), because we are convinced to use best toolset in the +market so far. + +## Debugging Drupal Code + +### Add a PHP Server + +First, you have to set up a Drupal environment with the tool [l3d](../docker/l3d/index.md). The tool is +based on Docker containers. + +Now navigate to File->Settings in your IDE and create a server: + + + +Set the following values: + + + +**Important: Always use Docker as name of your server.** + +Do not forget to add the file mapping to `/var/www/html`. + +### Add a new Run/Debug Configuration + + + +First create a new `PHP Web Page` configuration: + + + +Set the following values: + + + +Select the server you just have created. + +**Important: Always use Docker as name of your configuration.** + +### Start Debugging + +First, check the debug settings in your IDE. It should look something like this: + + + +Now activate the `Phone` icon in your IDE: + + + +Now you can set your breakpoints and enjoy debugging Drupal code. + +## Execute Drupal tests within your IDE + + diff --git a/docs/files/screenshots/configuration_add.png b/docs/files/screenshots/configuration_add.png new file mode 100644 index 0000000..2c29d7e --- /dev/null +++ b/docs/files/screenshots/configuration_add.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a2b35144e5278faeb5ec373002ff93f31b7b14d5603b25435eee342ca84354f +size 31426 diff --git a/docs/files/screenshots/configuration_done.png b/docs/files/screenshots/configuration_done.png new file mode 100644 index 0000000..ffed74c --- /dev/null +++ b/docs/files/screenshots/configuration_done.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7dcc63d1d642bf1b988429393e9ddd48579dc43a80f6b1d3ce2a30377e1bb69b +size 42556 diff --git a/docs/files/screenshots/configuration_new_webpage.png b/docs/files/screenshots/configuration_new_webpage.png new file mode 100644 index 0000000..3538c31 --- /dev/null +++ b/docs/files/screenshots/configuration_new_webpage.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:771edc61d04ffe6627ce4aa574b23b261e8b75d1533298470f980233a799c276 +size 52276 diff --git a/docs/files/screenshots/settings_php_add_server.png b/docs/files/screenshots/settings_php_add_server.png new file mode 100644 index 0000000..6772ae8 --- /dev/null +++ b/docs/files/screenshots/settings_php_add_server.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:401f707c2be7e92386f7e65e6bcef1762f154f079fa72d4c61436e06d0b3c4bf +size 60007 diff --git a/docs/files/screenshots/settings_php_debug.png b/docs/files/screenshots/settings_php_debug.png new file mode 100644 index 0000000..817bb4a --- /dev/null +++ b/docs/files/screenshots/settings_php_debug.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97beb69aff4f7fe6cd448092d61c97ae2519f0949abc53c6cf386e86d3680be6 +size 124690 diff --git a/docs/files/screenshots/settings_php_new_server.png b/docs/files/screenshots/settings_php_new_server.png new file mode 100644 index 0000000..7317ce7 --- /dev/null +++ b/docs/files/screenshots/settings_php_new_server.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f07d2e7dcf09d30c393d152b2e669ab50b11090e55a3f3b4bfcac1884951400c +size 21510 diff --git a/docs/files/screenshots/start_debug.png b/docs/files/screenshots/start_debug.png new file mode 100644 index 0000000..fd56d99 --- /dev/null +++ b/docs/files/screenshots/start_debug.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:126dc4605ae672c1eeec825743fe88adff6828acb8bc22e9fabcf0784acd5618 +size 16211 -- GitLab