Enable Xdebug in MS Visual Studio Code using WAMP server
Вставка
- Опубліковано 20 вер 2024
- Download xdebug here: xdebug.org/dow...
Make sure that you choose your version of PHP
Settings for php.ini file:
[xdebug]
zend_extension="|| location of wamp ||/zend_ext/php_xdebug-2.7.2-7.3-vc15-x86_64.dll"
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = Off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir ="c:/wamp/tmp"
xdebug.show_local_vars=0
After you download xdebug .dll file enable it under the PHP extensions in WAMP if available and then check if some of these settings appeared in php.ini.
If you have any problems comment in the section below.
Cheers. :)
I recommend you also add this line to the php.ini configuration:
xdebug.start_with_request=trigger
Then use extension for browser to start debuging. Or if you want the Xdebug to be always running change it to:
xdebug.start_with_request=yes
From now on you can connect and listen to Xdebug from VS Code.
Really this step was necessary in order to make xdebug works in my environment. Thanks!
Thanks this helped me a lot!
Cheers!
Yes its working now. Thank you for help.
Thank You..It helped a lot.I was struggling to debug it in Visual Studio Code.Now it seems fine.Thanks again
Thank you so much ❤️🥰
Work like a dream, thank you very much !
Thanks a lot! It works
I'm glad it helped. :)
thanks, the xdebug.remote_autostart is what i need
great. thank you! Do you have any qcachegrind usage example, please ?
No sorry I haven't used that so far
thank you anyway. try it, helps finding bottlenecks in the app
this approch doesn't work for codeigniter 4, in case someone tries to configure it
HELLO FRIEND, I FOLLOWED ALL THE STEPS, BUT I HAVE THIS PROBLEM:
This website cannot be accessed
The connection has been re-established.
Try to:
Verify connection
Verify the proxy and the firewall
Run Windows Network Diagnostics
ERR_CONNECTION_RESET, in the browser, please help me....
Can you explain in more detail, I think that you are not able to access the site you are working on at all, doesn't seem to be related to xDebug. Check wamp/mamp/lamp is installed properly on you computer.
@@fkangalov dear friend thanks for replying, i am using xamp, the procedure is the same.
@@henryhidalgosandoval1831 can you access any php project?
@@fkangalov Once inside the folder, what procedures do I have to carry out ...
@@henryhidalgosandoval1831 which folder, can you specify a path
If somebody has issues on Chrome it might help installing the extension "Debugger for Chrome". I had problems on my laptop and made it to work like that. Hope this helps.
Напомнило старый анекдот
знакомство в соцсети:
- Hi! Where are you from?
- Hi! I from Russia. And you?
- I from France.
- Pizz dish.
- Chestnoe slovo.