0

I am trying to get PHP debugging to work in VS code on a Debian system. I have followed several different posts and videos and help files and just can't get it to work. There is conflicting information probably due to different versions of the software?

Here is what I have:

  • VS Code 1.65.0
  • XAMPP for Linux 8.0.15 (Apache is running)

Installed VS Code extensions PHP Debug PHP Intellisense

Installed xdebug through apt-install (shows version 3.02+2.9.8....) But if I run phpinfo() I do not see an entry for xdebug Running the xdebug wizard it says that xdebug is not installed so I followed the steps outlined

   download/extract xdebug-3.1.3
   run phpize
   run ./configure
   run cp modules/xdebug.so /opt/lampp/lib/php/extensions/no-debug-non-zts-20200930
   ^^This gives me an error cp: cannot stat 'modules/xdebug.so' : no such file or directory

The instructions also state to add

   zend_extension = xdebug

In the VS Code, it stated to make the follwing changes: added below to /opt/lampp/etc/php.ini (php.ini as shown by phpinfo()) (in the Dynamic Extensions section) zend_extension =xdebug.so (I tried keeping the above one and keeping just this one)

(at the end of the file-not sure where it was supposed to go? But looks like it is in the [opcache] section?

xdebug.mode= debug
xdebug.start_with_request = yes

And I tried several other things and still no luck. What info do you need and what do I need to do to get the debugging working?

Thanks

2
  • use this tool xdebug.org/wizard to get specific info for your configuration. Commented Mar 4, 2022 at 22:59
  • Did you see post where it outlines the steps I took in xdebug.org/wizard? Commented Mar 4, 2022 at 23:18

1 Answer 1

1
download/extract xdebug-3.1.3
run phpize
run ./configure
run cp modules/xdebug.so /opt/lampp/lib/php/extensions/no-debug-non-zts-20200930

The wizard instructions tell you to run make between run ./configure and run cp modules/xdebug.so /opt/lampp/lib/php/extensions/no-debug-non-zts-20200930

The make step is what compiles the extension.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.