Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

201
Vistas
Difficulty debugging Magento 2 with xdebug without it calling writeClose()

As the title suggests, in some situations I step through the Magento 2 code, only for it to go to Magento\Framework\Session\SessionManager::writeClose(), thus calling session_write_close() and terminating the application immediately. The Call Stack is practically empty, so I can't see what is calling this. However if I insert a breakpoint and continue from there, it loads the website as if nothing has happened.

It only seems to occur on Magento 2 websites where it would suddenly terminate in such a fashion, however I'm not sure if it could be an issue with xdebug, Apache, or PHP-FPM.

Is there a reason why writeClose gets called, and how do I prevent this from occurring again whilst debugging?

System details:

  • Linux Ubuntu 18.04.2 LTS (in WSL)
  • PHP Version: 7.0.33
  • Server API: FPM/FastCGI
  • xdebug version: 2.8.1

If you require any additional information, then please leave a comment, and I shall update accordingly :-)

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

writeClose is called when you get an exception.

There is no way to prevent it.

The solution is to find where is the exception by debugging deeply.

When you debug then try to use F7 more instead of pressing F8 , you will go through all functionalities and get where the exception is. Then you see the root cause by exception messages.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda