Which IDE do you recommend for php-src development?

php.internals

Barel

1 year ago
Hi For C/C++ development I usually use CLion from Jetbrains but I tried to use it with php-src and was unable to get it to work properly. CLion really insists on using CMake and has only quite limited support for makefiles. After trying to get it to work unsuccessfully I am ready to try something else. So which IDE would you recommend for php-src development? I understand that people probably have many different preferences but I wondered if there was something that most php internals developers used. One important feature would be to easily work with the project running on a docker container Thanks in advance! Carlos

Jordan LeDoux

1 year ago
On Sat, Sep 14, 2024 at 2:45 PM Barel <barel.barelon@gmail.com> wrote:
> Hi > > For C/C++ development I usually use CLion from Jetbrains but I tried to > use it with php-src and was unable to get it to work properly. CLion really > insists on using CMake and has only quite limited support for makefiles. > After trying to get it to work unsuccessfully I am ready to try something > else. > > So which IDE would you recommend for php-src development? I understand > that people probably have many different preferences but I wondered if > there was something that most php internals developers used. One important > feature would be to easily work with the project running on a docker > container > > Thanks in advance! > > Carlos >
Re-sending because I accidentally didn't reply-all: I actually use CLion. There was an article that described exactly how to get php-src working with CLion by Ben Ramsey, so maybe they can chime in: https://dev.to/ramsey/using-clion-with-php-src-4me0 Jordan

Pierre

1 year ago
Le 14/09/2024 à 23:44, Barel a écrit :
> Hi > > For C/C++ development I usually use CLion from Jetbrains but I tried > to use it with php-src and was unable to get it to work properly. > CLion really insists on using CMake and has only quite limited support > for makefiles. After trying to get it to work unsuccessfully I am > ready to try something else. > > So which IDE would you recommend for php-src development? I understand > that people probably have many different preferences but I wondered if > there was something that most php internals developers used. One > important feature would be to easily work with the project running on > a docker container > > Thanks in advance! > > Carlos
Eclipse for C/C++ developers may work as well. I did use it for writing an xdebug patch and reading the PHP source code. Regards, Pierre

Ilija Tovilo

1 year ago
Hi Carlos On Sat, Sep 14, 2024 at 11:44 PM Barel <barel.barelon@gmail.com> wrote:
> > For C/C++ development I usually use CLion from Jetbrains but I tried to use it with php-src and was unable to get it to work properly. CLion really insists on using CMake and has only quite limited support for makefiles. After trying to get it to work unsuccessfully I am ready to try something else. > > So which IDE would you recommend for php-src development? I understand that people probably have many different preferences but I wondered if there was something that most php internals developers used.
I tried to like CLion, but it was extremely laggy for me every time I tried it. php-src contains some rather large files, and even some dsl (zend_vm_def.h) that didn't work well at all. I also didn't find a way to add simple highlighting support for PHP test files. VSCode works surprisingly well, I've used it for C development for years. I created a simple guide for setting it up, including gdb. It shouldn't take you more than 10 minutes. [1] Zed is also already a decent option that essentially just works out of the box. Unfortunately, it's currently lacking debugging support. [2]
> One important feature would be to easily work with the project running on a docker container
Can't help you there, I don't use Docker for C development. Ilija [1] http://php.github.io/php-src/introduction/ides/visual-studio-code.html [2] https://zed.dev/

Tim Düsterhus

1 year ago
Hi On 9/15/24 12:22, Ilija Tovilo wrote:
> VSCode works surprisingly well, I've used it for C development for > years. I created a simple guide for setting it up, including gdb. It > shouldn't take you more than 10 minutes. [1] >
Can confirm: I also use Visual Studio Code and I'm super happy with it. I do use gdb purely from the command line, though. Best regards Tim Düsterhus

Christoph Becker

1 year ago
On 15.09.2024 at 12:22, Ilija Tovilo wrote:
> On Sat, Sep 14, 2024 at 11:44 PM Barel <barel.barelon@gmail.com> wrote: > >> So which IDE would you recommend for php-src development? I understand that people probably have many different preferences but I wondered if there was something that most php internals developers used. > > VSCode works surprisingly well, I've used it for C development for > years. I created a simple guide for setting it up, including gdb. It > shouldn't take you more than 10 minutes. [1] > > [1] http://php.github.io/php-src/introduction/ides/visual-studio-code.html
"For Windows, ymmv." Mine does not; I usually use VSCode for developing and debugging (only occassionally Visual Studio for the latter). Debugging works using "cppvsdbg" instead of "cppdbg"; besides "launch", "attach" also works fine if you have started VSCode with elevated privileges. I'm running the build steps from an external console, but integrating that in VSCode on Windows shouldn't be hard. Oh, and VSCode on Windows is also fine for developing and debugging php-src in WSL. Christoph

Christoph Becker

1 year ago
On 14.09.2024 at 23:44, Barel wrote:
> […] One important feature > would be to easily work with the project running on a docker container
You may be interested in <https://github.com/php/php-src/pull/15203>. Christoph

zeriyoshi

1 year ago
2024年9月15日(日) 19:49 Christoph M. Becker <cmbecker69@gmx.de>:
> On 14.09.2024 at 23:44, Barel wrote: > > > […] One important feature > > would be to easily work with the project running on a docker container > > You may be interested in <https://github.com/php/php-src/pull/15203>. > > Christoph >
I would like to move this forward. DevContainers + VSCode is probably the simplest and easiest development environment we can offer right now. I've been switching to the branch of this Pull Request to do development, but if we could merge this, it would save me the trouble of switching and be very helpful. Best regards, Go Kudo

Derick Rethans

1 year ago
On 14 September 2024 22:44:20 BST, Barel <barel.barelon@gmail.com> wrote:
>Hi > >For C/C++ development I usually use CLion from Jetbrains but I tried to use >it with php-src and was unable to get it to work properly. CLion really >insists on using CMake and has only quite limited support for makefiles. >After trying to get it to work unsuccessfully I am ready to try something >else. > >So which IDE would you recommend for php-src development?
I use vim. With the ctags plugin, but that's mostly it. Debugging with gdb and valgrind. I avoid docker, as that had always made it harder to do things. cheers Derick

Barel

1 year ago
On Sat, 14 Sept 2024 at 23:44, Barel <barel.barelon@gmail.com> wrote:
> Hi > > For C/C++ development I usually use CLion from Jetbrains but I tried to > use it with php-src and was unable to get it to work properly. CLion really > insists on using CMake and has only quite limited support for makefiles. > After trying to get it to work unsuccessfully I am ready to try something > else. > > So which IDE would you recommend for php-src development? I understand > that people probably have many different preferences but I wondered if > there was something that most php internals developers used. One important > feature would be to easily work with the project running on a docker > container > > Thanks in advance! > > Carlos >
Answering myself in case someone finds this useful in the future. Several people recommended VSCode so decided to give it a try. I found this guide which describes very well what you need to do to get VSCode working for a php-src project hosted in a docker container. Works brilliantly, I am able to work with the code in the container using all VSCode features, including debugging with GDB. Nice! https://bogomolov.tech/php-extension-development/ Cheers Carlos

Hans Henrik Bergan

1 year ago
+1 for VSCode, I use it practically everywhere these days, HTML/Javascript/TypeScript/PHP/C/C++/Python/Lua, all on VSCode. On Mon, 16 Sept 2024 at 13:07, Barel <barel.barelon@gmail.com> wrote:

Larry Garfield

1 year ago
On Mon, Sep 16, 2024, at 7:06 PM, Hans Henrik Bergan wrote:
> +1 for VSCode, I use it practically everywhere these days, > HTML/Javascript/TypeScript/PHP/C/C++/Python/Lua, all on VSCode. > > On Mon, 16 Sept 2024 at 13:07, Barel <barel.barelon@gmail.com> wrote: >> >> On Sat, 14 Sept 2024 at 23:44, Barel <barel.barelon@gmail.com> wrote: >>> >>> Hi >>> >>> For C/C++ development I usually use CLion from Jetbrains but I tried to use it with php-src and was unable to get it to work properly. CLion really insists on using CMake and has only quite limited support for makefiles. After trying to get it to work unsuccessfully I am ready to try something else. >>> >>> So which IDE would you recommend for php-src development? I understand that people probably have many different preferences but I wondered if there was something that most php internals developers used. One important feature would be to easily work with the project running on a docker container >>> >>> Thanks in advance! >>> >>> Carlos >> >> >> Answering myself in case someone finds this useful in the future. >> >> Several people recommended VSCode so decided to give it a try. I found this guide which describes very well what you need to do to get VSCode working for a php-src project hosted in a docker container. Works brilliantly, I am able to work with the code in the container using all VSCode features, including debugging with GDB. Nice! >> >> https://bogomolov.tech/php-extension-development/
Please please someone capture the details of this thread somewhere on the wiki or php.net, or maybe even in the php-src repo itself. We really need to have good "how to get from git clone to a working C debugger" instructions. --Larry Garfield

Levi Morrison

1 year ago
On Sat, Sep 14, 2024 at 3:47 PM Barel <barel.barelon@gmail.com> wrote:
> > Hi > > For C/C++ development I usually use CLion from Jetbrains but I tried to use it with php-src and was unable to get it to work properly. CLion really insists on using CMake and has only quite limited support for makefiles. After trying to get it to work unsuccessfully I am ready to try something else. > > So which IDE would you recommend for php-src development? I understand that people probably have many different preferences but I wondered if there was something that most php internals developers used. One important feature would be to easily work with the project running on a docker container > > Thanks in advance! > > Carlos
I use the Makefile integration with CLion. It works alright. Better than any other C IDE I've used so far. What things are you struggling with specifically?