-
-
Notifications
You must be signed in to change notification settings - Fork 866
Xdebug on API #849
-
Hello,
Xdebug is installed on php.ini
No troubleshooting with: docker compose exec php php --version
I had installed extension for Vscode and Microsoft Edge, Set up the launch.json in .vscode, it's not working, no trace...
Ideas please?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 3 comments 6 replies
-
Hi @ArmandArthur!
It looks like a similar question has already been raised. See #782
Beta Was this translation helpful? Give feedback.
All reactions
-
on vscode?
Beta Was this translation helpful? Give feedback.
All reactions
-
Issue #782 describes an issue with XDebug when FrankenPHP's worker mode is enabled. You're likely experiencing a similar problem.
I also recommend checking out the docs/xdebug.md for more information on configuring XDebug for VS Code.
Beta Was this translation helpful? Give feedback.
All reactions
-
Ok what's this worker mode?
Edit: right; worker mode not work with xdebug, should i need to activate worker mode in prod?
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.
All reactions
-
ok boot time, how enabled for prod and not in dev?
Beta Was this translation helpful? Give feedback.
All reactions
-
This discussion was already at #782. See #782 (comment).
Beta Was this translation helpful? Give feedback.
All reactions
-
Strange, watch is enabled in compose.override.yaml but it's for prod?
inDockerFile
FROM frankenphp_base AS frankenphp_dev ENV APP_ENV=dev ENV XDEBUG_MODE=off ENV FRANKENPHP_WORKER_CONFIG=watch
Which value for prod?
Beta Was this translation helpful? Give feedback.
All reactions
-
watch is a FrankenPHP option for automatically restarting when changes are detected in project files. See https://frankenphp.dev/docs/config/#watching-for-file-changes.
This option is enabled only for the dev environment because file changes are only expected for this environment. In prod, files shouldn't change, and this option is not needed for prod. Therefore, this option is enabled only for dev.
The FRANKENPHP_WORKER_CONFIG environment variable was added to the Dockerfile for the frankenphp_dev target in #765. This PR enabled worker mode for dev. Before this PR, worker mode was enabled only for prod.
You can revert #770 and #765 for your project to restore the previous behavior (so that worker mode only works for production). After revert and rebuilding the image, XDebug should start working. See #782 (comment).
Beta Was this translation helpful? Give feedback.