frankenphp icon indicating copy to clipboard operation
frankenphp copied to clipboard

Add documentation about (frankenphp) developer tooling: e.g. GoLand, Clangd, debugging, etc.

Open henderkes opened this issue 5 months ago • 8 comments

Describe your feature request

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [my IDE shows me red squiggly lines everywhere and I have to use gdb on the command line to debug the php code - and don't know how to debug the Go code].

Describe the solution you'd like Documentation how to set up at least GoLand or VSCode + other tooling to get syntax highlighting and debug Go and C code from within the IDE

henderkes avatar Aug 03 '25 14:08 henderkes

Unfortunately, GoLand as poor cgo/Csupport and CLion doesn't support Go at all.

VSCode with the official Go extension is the best option so far.

dunglas avatar Aug 03 '25 21:08 dunglas

I wouldn't mind that either, the point is to add some documentation on how to set up a (graphical) environment to efficiently work on FrankenPHP. It will greatly help onboard developers willing to contribute to php/frankenphp.

I'll add extensive documentation for GoLand/CLion for php later.

henderkes avatar Aug 04 '25 01:08 henderkes

I use clion to debug the whole stack when I need to, but if I'm just debugging the go side, I use goland.

withinboredom avatar Aug 04 '25 07:08 withinboredom

You can debug the Go code in CLion? I got debugging for the C code working in CLion, but not the Go stuff.

henderkes avatar Aug 04 '25 08:08 henderkes

It "just works" for me, but I just connect to a running process from clion, set up paths, and it works. I haven't tried running it from clion.

withinboredom avatar Aug 04 '25 09:08 withinboredom

Hmm, breakpoints in the Go code only work for me inside GoLand, while breakpoints in the C code only work for me in CLion x)

I'll tinker with it some more then.

henderkes avatar Aug 04 '25 09:08 henderkes

Not sure what I'm missing, but I can't seem to get Go integration working in CLion. I can get FrankenPHP to build, execute and such, but only breakpoints in C/++ files can be set.

henderkes avatar Aug 04 '25 12:08 henderkes

CGo seems to be in a really sad state, IDE support wise. VSCode works with both Go and C debugging, but C.method calls are all underlined with squiggly red lines. In GoLand the syntax highlighting works properly for Go files, but not for C files. In CLion the syntax highlighting works properly for C files, but not for Go files.

Can set breakpoints in Go code by designating *.go files as C/C++ files, though.

henderkes avatar Aug 05 '25 03:08 henderkes