How to debug PHP in Visual Studio Code (Simple steps)

  Рет қаралды 44,740

coderJeet

coderJeet

Жыл бұрын

I set up my debugger today and created this quick video to help you in case you want to debug PHP in Visual Studio Code.
Settings to enter in PHP.ini (from the video)
zend_extension = xdebug
[XDebug]
xdebug.mode = debug
xdebug.start_with_request = yes

Пікірлер: 39
@truthvfiction
@truthvfiction 2 ай бұрын
There are many "how to" xdebug setup videos for PHP in VS Code. None of them explained this at all. This is the only video that actually worked. Who knew the settings.json line items had to be manually inserted? Nobody has explained this before. Now I can accelerate my work to a much greater degree. I am very grateful my friend.
@tripmad
@tripmad Жыл бұрын
Happy to see your new video!
@NedumEze
@NedumEze 10 ай бұрын
Thanks, Jeet. You seem to have made light of the reality that many cannot do the "step through" the code! You focused on set-up which is very helpful. But what use is set-up when I can't use it!
@digital_sorceress
@digital_sorceress 5 ай бұрын
When you have the php file open you can click off just to the left of a line number to set a breakpoint ... the breakpoints checkboxes in the run debug should be checked for the php file and then when you run it should stop at the point you set.. you should then be able to use f10 to step over f11 to step in f5 to continue etc..
@cyex4311
@cyex4311 4 ай бұрын
Thank you for the concise and easy to follow video. Teaching me more than my course!
@digital_sorceress
@digital_sorceress 5 ай бұрын
On a new VSCode install the debug options for running in browser are not there - it seems some step was missed - you must have some other extension installed or configuration you did not go over. Also telling people to use search for the settings.json only works if you've ever opened it before settings.json is stored in c:\users\YOUR_USERNAME\AppData\Roaming\Code\User\settings.json but would be easier to find if you told folks to go to the PHP Debug addon then click on the settings icon then select extension settings then click the "edit in settings.json" to find it The video was fairly helpful but it's assuming a lot - probably because you already have things installed and configured that you take for granted.
@digital_sorceress
@digital_sorceress 5 ай бұрын
OK so missing critical info - I was just testing by making a random php file with some code in it - in that case the run just runs /debugs to console however, I tried pointing vscode to open a directory where apache was serving from c:\xampp\htdocs and then had debug and run create a launch.json for it - THEN I was able to get the run options mentioned. Over all the video was helpful, and saved me a lot of steps but there are quite a few assumptions
@quochuynguyen7236
@quochuynguyen7236 7 ай бұрын
Thank you so much. Very helpful for me. Don't meet any problem while installing. Just following your video step by step. Great
@juhelius1234
@juhelius1234 Ай бұрын
Thank you for the straightforward tutorial, worked like a charm!
@Bondjara
@Bondjara 5 ай бұрын
This helped me a lot! Thank you!
@sbastion8446
@sbastion8446 10 ай бұрын
Thanks a bunch for the help! The debug works now 👍
@nilscarrillo4247
@nilscarrillo4247 9 ай бұрын
thanks for your video it was so helpful for me!
@asherheed
@asherheed 7 ай бұрын
thanks bro this was very clear. helped me a lot
@strikerwow2011
@strikerwow2011 Жыл бұрын
Amazing video, thanks!
@chriswha735
@chriswha735 6 ай бұрын
you save me a lot of time, thank you, very clear
@tmis0806
@tmis0806 5 ай бұрын
Simply and easy! Thanks
@jesusalbertocervantes8558
@jesusalbertocervantes8558 8 ай бұрын
hi, nice video, i had one question, do you had to use composer to create that app ?? i tryiet this on my own proyect but i failed hehe, thanks
@cbbcbb6803
@cbbcbb6803 9 ай бұрын
Thanks. I would also like to see a set-up of this on Linux.
@SathyamoorthiP
@SathyamoorthiP 4 күн бұрын
Thanks. This is really helpful.
@jansenk31
@jansenk31 8 ай бұрын
Thank you, very usefull!
@maurofabian4061
@maurofabian4061 3 ай бұрын
thx man, you are amazing :)
@user-md2og1hz2h
@user-md2og1hz2h 3 ай бұрын
Hey Jeet, I followed the steps but the debugger is not getting hit can you help me with the configuration of 'launch.json' too?
@NATANpoa
@NATANpoa Ай бұрын
Você é o cara. Me salvou. Obrigado.
@casasniper
@casasniper 5 ай бұрын
its not working , it asking me create launch.json file
@thiagoantunes892
@thiagoantunes892 2 ай бұрын
Thanks a bunch!
@yashwantpanday3351
@yashwantpanday3351 3 күн бұрын
am not getting setting.json file please help me
@sankiGunda.
@sankiGunda. 6 ай бұрын
thankyou sir g
@KennethRJones-SWEN
@KennethRJones-SWEN Ай бұрын
THANK GOD
@md.shaheenalamjony4945
@md.shaheenalamjony4945 11 ай бұрын
Thanks
@vanchien5874
@vanchien5874 3 ай бұрын
Thanks.
@saharaprotocol
@saharaprotocol 4 ай бұрын
thx bro
@douradavidboge6804
@douradavidboge6804 10 ай бұрын
Cant find settings.json
@adambhatti9001
@adambhatti9001 7 ай бұрын
@@thecodeiseverything can you explain it
@deepub3295
@deepub3295 7 ай бұрын
c:users\xxxx\AppData\Roaming\code\users\settings.json that folder may be hidden
@starexrex
@starexrex 4 ай бұрын
you using xampp so you wrong
@henrywans8333
@henrywans8333 Ай бұрын
did not worked at all
@blaircooper9956
@blaircooper9956 3 ай бұрын
X Debug tried. OMG must have been designed to debug this sole code. It's a joke. Please dont publish useless info
@Sandipansarkar16
@Sandipansarkar16 Ай бұрын
you are not my best friend stop saying that it is so weird to hear🙄
Tips and Tricks for Debugging JavaScript
13:03
James Q Quick
Рет қаралды 404 М.
Setup debugging for PHP8.1 with XDebug 3 in VSCode
15:27
The Codeholic
Рет қаралды 62 М.
Купили айфон для собачки #shorts #iribaby
00:31
🍟Best French Fries Homemade #cooking #shorts
00:42
BANKII
Рет қаралды 62 МЛН
🍕Пиццерия FNAF в реальной жизни #shorts
00:41
Would you like a delicious big mooncake? #shorts#Mooncake #China #Chinesefood
00:30
How to Use a Debugger - Debugger Tutorial
17:01
Tech With Tim
Рет қаралды 291 М.
How to Debug Errors in PHP Script
16:18
Programming with Vishal
Рет қаралды 23 М.
Are you debugging JavaScript in VSCode? | YOU SHOULD!
7:06
Alex Ziskind
Рет қаралды 148 М.
12 VS Code Extensions to INCREASE Productivity 2024
27:13
Devression
Рет қаралды 506 М.
Debug PHP in VS Code on your local web server (XAMPP)
10:07
Installing Xdebug on MacOS (M1 chip)
9:32
Chris
Рет қаралды 2,3 М.
Debugging PHP7.4 with XDebug 2 and VsCode
10:00
The Codeholic
Рет қаралды 181 М.
Купили айфон для собачки #shorts #iribaby
00:31