webdevask.com

Menu

  • Home
  • New
  • Add question

visual studio code - Why not working breakpoint in PHP VSCode?

View Original

  1. Install XAMPP v3.2.4 x64 in c:\xampp and set path to environment variable

XAMPP

environment

  1. Get all text in phpinfo() and download dll file as per https://xdebug.org/wizard and copy in c:\xampp\php\ext and add text zend_extension=path in end of php.ini and check phpinfo() page and xdebug adding to this

Xdebug

  1. Add [XDebug] xdebug.remote_enable = 1 xdebug.remote_autostart = 1 in php.ini

php.ini

  1. Install VSCode v1.52.1

VSCode

  1. install Php Debug v1.13.1

PHP debug

  1. Create project in htdocs name of test and create file in to test.php

project

  1. Text in to test.php and set breakpoint in line

  2. Create automatic launch.json for PHP

launch.json

  1. Start debug

  2. Start chrome and url: localhost/test/test.php

But when refresh page breakpoint not working and not stop code.

Answer

Solution:

just just check listen port

[XDebug]
zend_extension=C:\xampp\php\ext\php_xdebug-3.0.1-7.2-vc15-x86_64.dll
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.mode=debug
xdebug.idekey=VSCODE
xdebug.start_with_request=yes
xdebug.client_host=127.0.0.1
xdebug.client_port=9000

Source

See also:

  • php สร้าง Google ชีตจากบัญชีบริการ

  • php - Laravel 8.0 Installation Failed

  • javascript - How to include HTML data (tags) as value in "arrayToDataTable" of Google Pie Chart?

  • how to Grouping array in php

  • php - vender folder from my laravel project has more 1k error

© 2021
E-mail: contact@webdevask.com
Back to top