Solved.

I modified XAMPP's php.ini file to point to the xdebug.so that homebrew installed, zend_extension="/opt/homebrew/Cellar/php/8.2.3/pecl/20220829/xdebug.so"

Then, I restarted the XAMPP server and ran this in terminal /Applications/XAMPP/xamppfiles/bin/php -v

Before the expected PHP info, there were some errors. Several times in the warnings it stated "...(mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')..." Oops.. I swore I chose x86_64..

So, I ran the following in terminal: pecl uninstall xdebug

Then, arch -x86_64 sudo pecl install xdebug

Following that I again ran /Applications/XAMPP/xamppfiles/bin/php -v and, voila!

PHP 8.2.0 (cli) (built: Dec 29 2022 08:42:31) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.0, Copyright (c) Zend Technologies
    with Xdebug v3.2.0, Copyright (c) 2002-2022, by Derick Rethans

Xdebug installed :] Works in my IDE too.

Answer from jon.oneil on Stack Overflow
🌐
Daniel Opitz
odan.github.io › 2020 › 12 › 03 › xampp-xdebug-setup-php8.html
XAMPP - XDebug Setup for PHP 8 | Daniel Opitz - Blog
December 3, 2020 - XAMPP for Windows: https://www.apachefriends.org/download.html · Microsoft Visual C++ Redistributable for Visual Studio 2015-2019 · Download Xdebug for the specific PHP version: PHP 8.0 (64-Bit): https://xdebug.org/files/php_xdebug-3.2.0-8.0-vs16-x86_64.dll ·
🌐
GitHub
gist.github.com › odan › 1abe76d373a9cbb15bed
Installing Xdebug for XAMPP with PHP 7.x
This version http://xdebug.org/files/php_xdebug-2.7.2-7.3-vc15-x86_64.dll works only on PHP 7.3.x and 64bit XAMPP
🌐
DevSense
blog.devsense.com › 2022 › install-xdebug-for-xampp-on-mac
How to install and configure Xdebug for XAMPP on Mac - DEVSENSE Blog
November 16, 2022 - XAMPP is a very popular cross-platform Apache distribution containing MariaDB (fork of MySQL), PHP, and Perl. But unfortunately, XAMPP doesn't come bundled with the Xdebug, which is an extension that enables PHP debugging.
🌐
XAMPP Xdebug
samuel-gfeller.ch › docs › XAMPP-Xdebug
XAMPP Xdebug - Samuel Gfeller
This guide will show how to install and configure Xdebug with XAMPP on Windows and how to use it without the need for an additional browser extension or manual trigger.
🌐
Xdebug
xdebug.org › docs › install
Xdebug: Documentation » Installation
Linux distributions might be providing an old and/or outdated version. If the package manager installs a version that is no longer supported (see Supported Versions), please install Xdebug with PIE, or from source instead.
Find elsewhere
🌐
Mr N
bigsoft.co.uk › blog › 2013 › 07 › 03 › setting-up-xdebug-under-xampp
Setting up XDebug under XAMPP - BigSoft Limited
Launch the XAMPP Control Panel. On the Apache row click Config, then PHP (php.ini) to load the PHP configuration file. ... Make sure the following options are uncommented (i.e. remove the semi-colon at the front of the line) and fill in the entries to match those below. [XDebug] zend_extension = "E:\xampp\php\ext\php_xdebug.dll" xdebug.remote_enable = 1 xdebug.remote_handler = "dbgp" xdebug.remote_host = "127.0.0.1" xdebug.remote_port = "9000"
🌐
YouTube
youtube.com › watch
XAMPP - PHP 8+Xdebug 3 on Linux - How to Install and Configure Xdebug - How to Debug PHP in NetBeans - YouTube
XAMPP, PHP 8, and Xdebug 3 on Linux - How to install and configure Xdebug 3 on Linux - How to Debug PHP in NetBeans.Video from Making App series - https://ww...
Published   March 15, 2021
🌐
LiteCart
litecart.net › en › wiki › how_to_use_xdebug_profiler
How To Use XDebug 3 with XAMPP on Windows | Wiki | LiteCart
[XDebug] zend_extension = xdebug xdebug.mode = profile xdebug.start_with_request=trigger xdebug.use_compression = false xdebug.output_dir = "c:\xampp\tmp\cachegrind" xdebug.profiler_append = 0 xdebug.profiler_enable = 1 xdebug.profiler_enable_trigger = 1 xdebug.profiler_output_name = "cachegrind.out.%s"
🌐
GitHub
gist.github.com › oleksis › acf28be2c03ca0595a86e0a03a7555b2
Installing Xdebug for XAMPP · GitHub
[XDebug] zend_extension = xdebug ;zend_extension = "c:\xampp\php\ext\php_xdebug-2.9.7-7.4-vc15-x86_64.dll" xdebug.mode = develop,debug xdebug.start_with_request = yes xdebug.log = "c:\xampp\tmp\xdebug.log" xdebug.remote_autostart = 1 xdebug.profiler_append = 0 xdebug.profiler_enable = 0 xdebug.profiler_enable_trigger = 1 xdebug.profiler_output_dir = "c:\xampp\tmp" ;xdebug.profiler_output_name = "cachegrind.out.%t-%s" xdebug.remote_enable = 1 xdebug.remote_handler = "dbgp" xdebug.remote_host = "dbsxrx.com" xdebug.remote_log = "c:\xampp\tmp\xdebug.log" xdebug.remote_port = 9003 xdebug.trace_output_dir = "c:\xampp\tmp" ;36000 = 10h xdebug.remote_cookie_expire_time = 36000
🌐
Xdebug
xdebug.org › wizard
Xdebug: Support — Tailored Installation Instructions
This page helps you finding which file to download, and how to configure PHP to get Xdebug running. Please paste the full output of phpinfo() (either a copy & paste of the HTML version, the HTML source or php -i output) and submit the form to receive tailored download and installation instructions ...
🌐
W3Guy
w3guy.com › home › setting up xdebug in xampp with phpstorm
Setting Up Xdebug in XAMPP with PhpStorm
February 2, 2015 - How to configure and setup Xdebug in XAMPP with PhpStorm IDE on Windows.
🌐
Medium
medium.com › @asd66998854 › php-code-debug-using-xampp-on-vscode-editor-97c5f6cc4487
PHP Code Debug Using XAMPP on VSCode Editor | by Clyde2034 | Medium
December 16, 2024 - Create the file named 「test.php」 under the xampp htdocs folder as 「C:\xampp\htdocs」. Open the test.php and echo the phpinfo(). Open the browser and go to the 「http://${your address}/test.php」, and now, direct press the 「Ctrl + A」 and 「Ctrl + C」 to copy the whole page element. ... Open the Xdebug Installation Wizard, and paste the content from the clipboard.
🌐
Joomla
docs.joomla.org › Edit_PHP.INI_File_for_XDebug
Edit PHP.INI File for XDebug - Joomla! Documentation
June 29, 2023 - Starting with version 1.7, XAMPP includes the XDebug PHP debugger, but it needs to be configured for use. To do that, we will edit the php.ini file to configure XDebug. The Loaded Configuration File tells you which php.ini file is being used.
🌐
Jimfrenette
jimfrenette.com › 2016 › 03 › xdebug-for-xampp-on-os-x
Xdebug for XAMPP on OS X | JimFrenette.com
./configure --enable-xdebug --with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config
🌐
Reddit
reddit.com › r/phphelp › debugging with php and xampp
r/PHPhelp on Reddit: Debugging with PHP and XAMPP
November 4, 2019 -

For context I'm using XAMPP for Apache MySQL and PHP as opposed to installing all of them separately.

One possible issue is that Im using VSCode and they recommend installing the full version of PHP so that I can use their intellisense and debugging extensions.

My question is: is there a way for me to use a debugger for PHP with the way I have it set up currently?

I'm going to be doing some stuff with databases and being able to debug is important.

🌐
Xdebug
xdebug.org › download
Xdebug: Downloads
Please refer to the installation instructions on how to install Xdebug · Xdebug is hosted in GIT. The source code can be browsed through GitHub and can be checked out with:
🌐
Medium
arjunamrutiya.medium.com › how-to-set-up-xdebug-with-laravel-and-xampp-a-step-by-step-guide-f99d5099c138
How to Set Up Xdebug with Laravel and XAMPP: A Step-by-Step Guide | by ArjunAmrutiya | Medium
July 8, 2023 - 1. Laravel installed on your system 2. XAMPP installed on your system 3. Basic knowledge of Laravel and XAMPP · Step 1: Install Xdebug extension To start, you need to install the Xdebug extension on your XAMPP installation.