Skip to content

Enable remote debug#10

Open
akiya64 wants to merge 2 commits intowckr:masterfrom
akiya64:enable-remote-debug
Open

Enable remote debug#10
akiya64 wants to merge 2 commits intowckr:masterfrom
akiya64:enable-remote-debug

Conversation

@akiya64
Copy link
Copy Markdown
Contributor

@akiya64 akiya64 commented Apr 2, 2020

settings

Add xdebug.ini in apache2/conf.d/ and fpm/conf.d dir.

HowTo

  1. Setting IDE or Editor for listen port 9000 and path mapping.

Example, setteings for Visual Studio Code.

data\wocker\wp-content\.vscode\launch.json

"configurations": [
     {
        "name": "Listen for XDebug",
        "type": "php",
        "request": "launch",
        "port": 9000,
        "pathMappings":{
            "/var/www/wordpress/wp-content":"${workspaceFolder}"
         }
    },
]
  1. Set break point in IDE.
  2. Set mode of IDE to listen XDebug.
  3. Start debug session by access http://wocker.test/?XDEBUG_SESSION_START or using browser addon.
  4. Stop breakpoint.

This screenshot show breaking line 30 in \wp-content\themes\twentytwenty\header.php
header php - wp-content - Visual Studio Code 2020_04_02 15_51_25

I was cheked break on Visual Studio Code and NeoVim in Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant