Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

275
Views
How to get Xdebug to connect when webhook call arrives via ngrok on MacOS

I currently run Apache 2.4, PHP 7.2, and Xdebug 2.9 on MacOS 10.14.6

Presently I can only use Xdebug when I enter a URL into the browser running on my mac that is handled by Apache running on same.

I'd like to be able to use Xdebug to single-step through PHP code when a webhook call arrives at my Mac via ngrok tunnel and is handled by Apache.

I've researched a bit and haven't found anything specific that shows what is required to do this. Is this possible?

Thanks in advance.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Yes. You can configure Xdebug to always attempt to make a debugging session, instead of relying on the browser GET/POST/COOKIE arguments.

You must set xdebug.remote_autostart to yes: https://2.xdebug.org/docs/all_settings#remote_autostart

You also need to set xdebug.remote_host to the IP address of the machine where your IDE is running at (likely, the same one as where ngrok is running at, which I'm going to guess, is just localhost). So set: xdebug.remote_host=localhost.

Please be aware that Xdebug 2 is no longer supported, and you're encouraged to upgrade to Xdebug 3 instead. There the configuration names would be xdebug.start_with_request=yes and xdebug.client_host=localhost instead (See the Upgrade Guide).

Xdebug 3 also has a new xdebug_info() function that can tell you how it is configured, and what it attempted to connect to, if at all.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!