I’m writing my own php code and want to upload it to my IF server. But I want to debug it before uploading. Is there a software/VScode plugin to debug php locally?
I’m not really sure what your looking for, nothing exists that can just fix your code for you.
For
- cheking error in the code
- Run the site on localhost and access from browser
Is there any software for it or I’ll need to build a LAMP on VM?
I mean testing
there are some online php syntax error checkers like this one
these are fine for finding typos but nothing exists that can find logic errors or other issues as far as im aware
You could also install a web server, php, mysql on your computer for testing your code locally before uploading, there are many ways to do this depending on which operating system you are running but possibly installing a virtual machine on your system running linux, nginx, php, mysql might be a good start
It’s been more than 20 years since I’ve installed a fully fledged web server for testing code so I kind of rusty
Finding information on how to do something these days is so difficult now that search engines just churn out endless pages of garbage due to the endless number of idiots online generating the garbage with ai chat engines
Just run it and see if it works how you want it to
Use XAMPP
Thanks to all
Does VSCode have XDebug integration?
I use it with PhpStorm, and it’s great that you can just click in the editor to enable a break point in a certain part in the code, run the code, and the code is paused where you have marked it. Then you can easily inspect all the variables and run extra PHP statements to see what’s going on.
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.