LoginSignup
1
1

More than 3 years have passed since last update.

PHP開発用のVisual Studioコード

Posted at

私は個人的にPHPStormを開発用のメインIDEとして使用していますが、作業中の最高のIDEについて議論し始めました.VSCodeを使用する人もいれば、PHPStormを使用する人もいます。議論のため、VSCodeが完全なPHP開発IDEとして動作するようにプラグインの検索を開始しました。

While I personally use PHPStorm as my main IDE for development, we started debating the best IDE at work, some use VSCode, others use PHPStorm, because of the discussion, I started searching for plugins to make VSCode behave as a full PHP development IDE.

私の検索では、このブログ投稿に出会いました
In my search I came across this blog post

vscode php development

このブログを読んで、私はインストールしました:
Reading this blog, I installed:

残りについては、 settings.jsonの指示に従っただけです。
For the rest, I just followed the instructions for the settings.json

私が行った唯一の追加手順は、常にdockerを使用し、マシンにローカルにPHPがインストールされていないため、「組み込みのphp検証」を無効にすることです。
The only extra step I took, is disabling the built-in php validation because I always use docker, and don´t have PHP installed locally on my machine.

VscodeおよびDocker用にXdebugを構成する

私は通常、開発環境にdockerを使用するため、xdebugの設定には時間がかかりました。さまざまなブログやstackoverflowの質問にアクセスした後、これが私の「launch.json」設定です
Since I usually make use of docker for my development enviroment, configuring xdebug took me a while, after visiting various blogs and stackoverflow questions, this is my launch.json config

{
        "name": "Listen for XDebug",
        "type": "php",
        "request": "launch",
        "port": 9000,
        "log": true,
        "externalConsole": false,
        "pathMappings": {
            "/application": "${workspaceFolder}"
        },
        "ignore": [
            "**/vendor/**/*.php"
        ]
    }

fuxideブログ投稿へのクレジット。これは設定の参照に使用します。
Credits to fuxide blog post, that I use for reference for the config.

何らかの理由で変数の監視は機能しませんが、これらはデバッガの一般的なセクションに表示されます
For some reason the variable watches don´t work, but these are visible in the general section of the debugger

CLIを使用するのが好きなので、gitプラグインをインストールしたくありませんでしたが、職場の友人からの推奨に従って、gitkraken を試してみます。
I did not want to install any git plugin, because I like using the CLI, but per recommendation from my friends at work, I´ll give gitkraken a try.

世の中の読者にとって、どのIDEが開発にお気に入りですか?
For the readers out there, what IDE is your favorite for development?

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1