


This article mainly records how to associate the Laradock container with VSCode, configure and use the container's PHP environment and some plug-ins, such as: phpcs
.
Since VSCode has inherited many tools, we can achieve our goals without any settings.
Open the code from the container
First we must ensure that we have started our container:
Then Start VSCode, use the command F1
, select Remote Explorer: Focus on Containers View
:
workspace Container:
OK, you can open the code, and The effect of selecting from the local path is the same:
Install the phpcs plug-in
Because the local Laradock is configured with multiple source code projects, it is installed globally.squizlabs/php_codesniffer, enter the workspace container:
// 进入容器 dc exec workspace bash // 安装插件 composer global require squizlabs/php_codesnifferInstall the
phpcs plug-in in VSCode:
"phpcs.executablePath": "/root/.composer/vendor/bin/phpcs", "phpcs.standard": "PSR2"
in
setting.json where phpcs path:
function and the method name. After the modification, the prompt disappeared:
Summary
With the environment, you don’t need to install the required environment locally. , such as PHP, phpcs, etc., you can completely make your computer very "clean". When you are not developing, you can directly close Docker or the container and leave the computer in "office" status. Seamless switching between "Development" and "Administrative Office". Recommended learning: "PHP Video Tutorial"
The above is the detailed content of Let's take a look at how VSCode configures the Laradock container and PHPCS plug-in. For more information, please follow other related articles on the PHP Chinese website!

2022年了,该学会用VSCode debug了!下面本篇文章手把手带大家会习VSCode debug,希望对大家有所帮助!

本篇是VSCode配置文章,手把手教大家怎么在VSCode中配置使用 Geant4 和 Root,希望对大家有所帮助!

本篇文章扒拉一下vscode Prettier的选项,总结分享16个让你的代码变漂亮的属性,希望对大家有所帮助!

“工欲善其事,必先利其器!”,vscode作为前端开发的重要工具,其插件能大幅提升战斗力,精心收集12个插件,总有几款你还未曾拥有。

VSCode中如何开发uni-app?下面本篇文章给大家分享一下VSCode中开发uni-app的教程,这可能是最好、最详细的教程了。快来看看!

VScode中怎么开发置C/C++?怎么配置C/C++环境?下面本篇文章给大家分享一下Windows系统下VScode配置C/C++环境图文教程,希望对大家有所帮助!


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Dreamweaver CS6
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Atom editor mac version download
The most popular open source editor

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.
