Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set up XDebug PHP on Windows? #180

Closed
Julpikar opened this issue May 18, 2021 · 2 comments
Closed

How to set up XDebug PHP on Windows? #180

Julpikar opened this issue May 18, 2021 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@Julpikar
Copy link

Is there someone who managed to use XDebug on Xampp Windows?. I have executed the command :lua require('dap').continue(), but no changes have appeared. when I enter the command on REPL, the message No Active debug session appears as a result. This is the setup code that I have used:

-- PHP
  dap.adapters.php = {
    type = "executable",
    command = "node",
    args = {"C:/tools/vscode-php-debug/out/phpDebug.js"}
  }

  dap.configurations.php = {
    {
      name = "Listen for XDebug",
      type = "php",
      request = "launch",
      port = 9003
    },
}

and php.ini:

[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug-3.0.4-7.4-vc15-x86_64.dll"
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.client_host=127.0.0.1
xdebug.client_port=9003
xdebug.remote_log = "c:\xampp\tmp\xdebug.txt"

I have checked the state of Node.js, and I found it is running. I also checked the condition of port number 9003, and I found that the port is not used by other applications.

@mfussenegger mfussenegger added the help wanted Extra attention is needed label May 19, 2021
@mfussenegger
Copy link
Owner

Could you post the dap logs when the log level is set to trace? See :help dap.set_log_level()

@Julpikar
Copy link
Author

@mfussenegger, thanks for your great plugin. I have traced the issue why XDebug is not running. This problem also seems to arise after I use vimspector. I also checked for the same error on the internet, and found that it is a common error with xdebug. I have also tried using your plugin to debug golang and it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants