PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, July 3, 2022

[FIXED] How can I connect Xdebug 3 to PhpStorm on Windows 10?

 July 03, 2022     php, phpstorm, xampp, xdebug     No comments   

Issue

I'm trying to connect PhpStorm and debug PHP scripts/webpages with Xdebug, something I've done several times.

This is my php.ini file (the interesting bit):

[xdebug]
zend_extension=C:\xampp\php\ext\php_xdebug.dll
xdebug.remote_enable=1
xdebug.remote_port=10000
xdebug.remote_mode=req

I set multiple breakpoints and called xdebug_break() on my index but code execution is not stopping at them.

This is the PhpStorm validation script output for Xdebug:
This is the PhpStorm validation script output for Xdebug

The output of netstat which shows that PhpStorm is listening on port 10000:
The output of netstat which shows that PhpStorm is listening on port 10000


Solution

Change the lines in the php.ini to

xdebug.mode=debug

and set the port on PhpStorm to listen on 9003 instead of 9000.

In xdebug v3 the default xdebug port was changed to 9003: https://xdebug.org/docs/upgrade_guide#Step-Debugging



Answered By - Rijad Morina
Answer Checked By - Candace Johnson (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing