Skip to content

Commit ac58bef

Browse files
authored
update readme and tweak working directory (#1)
1 parent 384a78e commit ac58bef

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

README.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,21 @@ _The following instructions are for PHPStorm._
2727

2828
1. Click on Run > Edit Configurations
2929
2. Click the `+` and add a new PHP Remote Debug configuration
30-
3. Tick _Filter debug connection by IDE key_
31-
4. Give the configuration a name
32-
5. Click the `...` next to Server
33-
6. Click the `+` to add a new server
34-
7. Give the server a name, and set the host to `127.0.0.1`
35-
8. Hit Apply and OK until you've returned to the IDE
36-
9. Click the _Start Listening for PHP Debug Connections_ icon
37-
10. Set a breakpoint in your code
38-
11. Refresh the page in your browser
39-
12. Accept _Incoming Connection From Xdebug_
30+
3. Give the configuration a name
31+
4. Tick _Filter debug connection by IDE key_
32+
5. Add `PHPSTORM` in the session id
33+
6. Click the `...` next to Server
34+
7. Click the `+` to add a new server
35+
8. Give the server a name, and set the host to `127.0.0.1`
36+
9. Tick _Use path mappings_
37+
10. Open the Project files drop down
38+
11. Find the public folder, and under Absolute path on the server add `/code/public`
39+
12. Hit Apply and OK until you've returned to the IDE
40+
13. Click the _Start Listening for PHP Debug Connections_ icon
41+
14. Set a breakpoint in your code
42+
15. Refresh the page in your browser
43+
16. Accept _Incoming Connection From Xdebug_
44+
17. Happy debugging!
4045

4146
See https://xdebug.org/docs/remote for how to enable xdebug sessions.
4247

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ services:
55
ports:
66
- "80:80"
77
volumes:
8-
- ./public:/code
8+
- ./:/code
99
- ./docker/conf/default.conf:/etc/nginx/conf.d/default.conf
1010
php:
1111
build:
1212
context: ./docker
1313
volumes:
14-
- ./public:/code
14+
- ./:/code
1515
- ./docker/php/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
1616
mysql:
1717
image: mysql:latest

docker/conf/default.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ server {
44
server_name localhost;
55
error_log /var/log/nginx/error.log;
66
access_log /var/log/nginx/access.log;
7-
root /code;
7+
root /code/public;
88

99
location ~ \.php$ {
1010
try_files $uri =404;

0 commit comments

Comments
 (0)