-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Xdebug #314
Comments
There's a decent chance XDebug would just work if PHP was built with the right flags. Anyone keen to give it a try? |
@adamziel I'd love to give this a go, but due to my full-time job it might be a slow process. However... "boss man" has been wanting us to start supporting WP projects since we've become so heavily invested in the CMS for our agency clients. So, we'll see. A couple of things stand out right off the bat:
|
@adamziel Actually, I take that back. It seems like consideration for this is tied to Issue WordPress/playground-tools#28 |
@ibrokemycomputer actually XDebug support would be fantastic regardless of WordPress/playground-tools#28. You are the most welcome to give it a go! It would require updating the Dockerfile which builds PHP - you will notice some PHP version-dependent behaviors are already in there. As for config flags, Playground’s php-wasm supports setting php.ini flags so that would only be a matter of supporting custom php.ini in wp-now. |
I was able to build xdebug extension to wasm:
I had to patch the signature of these two functions and remove the final
I then tried to load it in
I looked for some answers on the dynamic linking page, but didn't find any. Emscripten changelogs suggest Edit: I used the
|
I've built a minimal https://gist.github.com/adamziel/9c7d3302407294e12d9c1d1eaa54cdba So it can work, yay! The key is indeed building with The question now becomes: What goes wrong when we use it with PHP? |
Other than step-debugger, XDebug seems to be working in #831. Anyone following this issue – would you rather get such a limited version of XDebug early and the step-by-step debugger support in one of the next iterations? Or is that step-by-step debugging the sole reason you're interested in XDebug? |
For me, step debugging is a pretty key component in that, but just having formatted I don't see any reason to hold off until it's all included, personally. |
Perfect! Let's not block the XDebug PR on the step debugger support. I can't promise any timeline, but the next step here is cleaning up and merging that PR 🔥 |
Xdebug is a common developer tool. It would be nice to (optionally) support it.
Done is:
wp-now
.The text was updated successfully, but these errors were encountered: