How to debug magento in vscode ?
I have checked https://devdocs.magento.com/cloud/howtos/debug.html
but its not useful for local debugging using vscode
Should be used X-Debug in VS code its very to install using vs code UI itself.
XDebug is a PHP extension that provides debugging capabilities for programming IDE.
Xdebug can do:
1 - Set/Remove breakpoints
2 - Perform an automatic stack trace
3 - Set a manual variable watch
4 - Enable function call logging
5 - Enable profiling
6 - Allow remote debugging
How to Install XDebug->
Step 1 : Go to Run -> start debuging ->choose more
Step 2 : You can see extensions in left side then find php debug (also known as X-Debug)
Step 3 : Click on Install button then i wull install.
Step 4 : After installation you need to configure it with local system add the line zend_extension=path/to/xdebug to your php.ini.
Step 5 : Finally, to enable debugging, enter the following in your php.ini in [XDebug]:
xdebug.remote_enable = 1
xdebug.remote_autostart = 1