Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Code with remote (docker) php interpreter

Actually we use PhpStorm for web development. it works pretty good for us. VS-Code is free so we want to check if it fits our needs.

One point i came around with is the missing ability to us docker with vs-code. In PhpStrom you can add remote interpreters like php. This functionality is clearly missing in vscode.

I cant find any extensions or other workarounds. Anybody of you has an idea to use vscode with php interpreter in docker?

One possible way iam thinking of is to share /usr/local//bin/php as a volume.

Thanks!

like image 631
Stillmatic1985 Avatar asked Jul 15 '26 11:07

Stillmatic1985


1 Answers

There has been an issue for this in the VSC repo on GitHub: https://github.com/Microsoft/vscode/issues/43636

However, it is closed and references this issue for general remote dev scenarios: https://github.com/Microsoft/vscode/issues/29194

So in short: It seems not possible, yet.

Alternative / Workaround

If developing on top of Kubernetes (e.g. with a local minikube on your machine) is an option for you, I wrote a small tool which works perfectly with VSC and lets you run and debug code remotely inside a pod within a Kubernetes cluster. You can find it on GitHub: https://github.com/covexo/devspace

like image 79
Lukas Gentele Avatar answered Jul 18 '26 02:07

Lukas Gentele