


One of the best parts of VSCode has to be the plugin system. Basic knowledge of the Laravel PHP framework.Out of the box, VSCode has a lot of desirable features but sometimes, we need to tweak it to our specification. VSCode is an open-source text-editor built by Microsoft for developers.

If we organized a poll to determine what text editors found most favorable for development purposes, VSCode will probably be one of the top ones.

I'm keeping it here in case it is useful.In this article we are going to look at how to make VSCode ready for Laravel/PHP Development. There is no reason to use it over the build task method described above. I originally thought that it works without PHP Debug but it looks like PHP Debug actually exposes the php type in the launch configuration. Note: This section was in my original answer. Note that if you already have a webserver running, you can remove the Start Server task and update the localhost:8080 part to point to whatever URL you are using. If you want to run your code on a webserver which serves a response to a web browser, open the command palette and select "Tasks: Run Task" followed by "Start Server" to run PHP's built-in server, then "Run In Browser" to run the currently open file from your browser. If you want to run your php file in the terminal, open the command palette and select "Tasks: Run Task" followed by "Run In Terminal". This creates user-level tasks which can be used any time and in any workspace. Now copy my configuration below into your tasks.json file. Using Build Tasks (No extensions required)įirst open the command palette ( Ctrl+ Shift+ P in Windows, ⌘+ Shift+ P in Mac), and select "Tasks:Open User Tasks". If you don't want to install xDebug or other extensions and just want to run a PHP file without debugging, you can accomplish this using build tasks.
