Visual Studio Code is a lightweight and powerful code editor that supports Windows, OS X and Linux. It has built-in support for JavaScript, TypeScript and Node.js, and has a rich plug-in ecosystem. You can install plug-ins to support other languages such as C, C#, Python, and PHP.
vscode editor supports writing in multiple languages and file formats. As of September 2019, it has supported the following 37 languages or files: F#, HandleBars, Markdown, Python, Jade, PHP, Haxe, Ruby, Sass, Rust, PowerShell, Groovy, R, Makefile, HTML, JSON, TypeScript, Batch, Visual Basic, Swift, Less, SQL, XML, Lua, Go, C, Ini, Razor, Clojure, C#, Objective -C, CSS, JavaScript, Perl, Coffee Script, Java, Dockerfile.
How to compile php with vscode?
vscode can support the PHP language by installing plug-ins, and then configure the PHP running environment.
VScode configures the PHP running environment
Preparation work:
1. Visual Studio Code;
2. xampp
3. Xdebug
Configuration steps:
1. Install php related plug-ins in Visual Studio Code
2. Configure the php path in the preferences
3. Place the Xdebug dll in the php related directory Next
4. Add the following code to the php.ini file
5. Set breakpoints in vscode debug. Note: You must open a folder to successfully set breakpoint debugging. A single file is invalid
Related recommendations:vscode introductory tutorial
The above is the detailed content of How to compile php with vscode?. For more information, please follow other related articles on the PHP Chinese website!