Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

276
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda