What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hi there Dear Team, I am writing to report an issue with configuring Xdebug in my
Hi there
Dear Team,
I am writing to report an issue with configuring Xdebug in my b2c-demo-shop. I have followed the steps below:
Cloned the b2c-demo-shop using the following URL: git clone
https://github.com/spryker-shop/b2c-demo-shop.git -b 202212.0 --single-branch ./b2c-demo-shopNavigated to the cloned folder: cd b2c-demo-shop
Cloned the SDK repository: git clone https://github.com/spryker/docker-sdk.git --single-branch docker
Added my user to the docker group: sudo usermod -aG docker $ashu
Bootstrapped local docker setup: docker/sdk bootstrap deploy.dev.yml
Opened the host file using the following steps and pasted the code we got in Step 4:
- Opened the Start menu.
- In the search field, entered Notepad.
- Right-clicked Notepad and selected Run as administrator.
- In the User Account Control window, selected Yes to confirm the action.
- In the upper navigation panel, selected File > Open.
- Put the following path into the address line: C:\Windows\System32\drivers\etc.
In the File name line, entered hosts and selected Open. The hosts file opened in the drop-down.
Open the host file and update it with the following data:
127.0.0.1 backend-api.at.spryker.local
127.0.0.1 backend-api.de.spryker.local
127.0.0.1 backend-api.us.spryker.local
127.0.0.1 backend-gateway.at.spryker.local
127.0.0.1 backend-gateway.de.spryker.local
127.0.0.1 backend-gateway.us.spryker.local
127.0.0.1 backoffice.at.spryker.local
127.0.0.1 backoffice.de.spryker.local
127.0.0.1 backoffice.us.spryker.local
127.0.0.1 glue.at.spryker.local
127.0.0.1 glue.de.spryker.local
127.0.0.1 glue.us.spryker.local
127.0.0.1 mail.spryker.local
127.0.0.1 queue.spryker.local
127.0.0.1 redis-commander.spryker.local
127.0.0.1 scheduler.spryker.local
127.0.0.1 spryker.local
127.0.0.1 swagger.spryker.local
127.0.0.1 yves.at.spryker.local
127.0.0.1 yves.de.spryker.local
127.0.0.1 yves.us.spryker.local
Added by Docker Desktop
192.168.1.7 host.docker.internal
192.168.1.7 gateway.docker.internal
To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal
End of section
- Built and started the instance using the following command: docker/sdk up
Task 2
Now, I am trying to configure Xdebug using the following steps:
Run the following command anywhere in the folder with "sudo": sudo apt-get install php-xdebug
Went to the following location: cd docker/context/php/debug/etc/php/debug.conf.d
Edited the Xdebug Configuration file using vim command: sudo vim xdebug.ini
Pressed the "i" button to insert(write) and pasted the following line in the "xdebug.ini" file:
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=on
Pressed "Esc" then ":wq!" Enter
Verified that Xdebug is installed and configured by running the following command: php -v
the last command i used docker/sdk up
and it gives error :
>WSL (10561) ERROR: UtilAcceptVsock:248: accept4 failed 110
failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to authorize: rpc error: code = Unknown desc = error getting credentials - err: exit status 1, out: ``
Kindly assist me with resolving this issue.
Thank you in advance for your help.
Comments
-
I suppose you donβt have to modify
xdebug.ini
for it. Have you checked the documentation on configuring debugging https://github.com/spryker/docker-sdk/blob/master/docs/02-development/05-configuring-debugging.md?0 -
I believe I followed another document; should I undo those modifications? before follow the one you shared
0 -
I think so
0 -
@U045KD44L7L Can you please tell me if you are using PHPStorm and would like to enable debugging on it? You usually do not have to to modify php.ini files as with docker it usually works out of the box.
0 -
@U048WDEP3R7 No actually I am using vs Code
0 -
-
@U04S0NQQ12N Okay, I completed the steps as instructed, but when I run docker/sdk up, all files deploy except for one with a web driver for PhantomJS, and occasionally elastic search and the demo shop won't load in the local host.
0 -
you'll have to adjust the paths for
runtimeExecutable
and the pathMapping for/data
to your local paths as well ofc0 -
Could you please explain to me how I may make these changes?
0 -
runtimeExecutable would be the path to your php instance (e.g. the output of
which php
) while the pathMapping for /data should be where your project is located (output ofpwd
in your project folder)0 -
@U045KD44L7L Have you configure the xdebugger with visual studio ?
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 930 Developer Corner
- 788 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random