ray
ray

Reputation: 301

VSCode PHP debug in Launch currently open script that breakpoint cannot work

I use PHP debug of VSCode in the Launch currently open script mode. When I use breakpoint to stop my PHP script, it will go to the end of my script.

These are my settings and my code:

enter image description here

enter image description here

enter image description here

Upvotes: 0

Views: 1171

Answers (1)

ray
ray

Reputation: 301

I find the answer. If we want to debug in the cli mode, we have to configure xdebug in the /etc/php/7.2/cli/php.ini. Previously, I just set /etc/php/7.2/fpm/php.ini!

It is my setting:

enter image description here

Upvotes: 1

Related Questions