Update remote ports and readme

This commit is contained in:
bamurtaugh
2021-03-16 16:19:56 +00:00
parent e6801554fe
commit 868c5b3576
2 changed files with 10 additions and 8 deletions

View File

@@ -15,13 +15,7 @@
// Set *default* container specific settings.json values on container create. // Set *default* container specific settings.json values on container create.
"settings": { "settings": {
"terminal.integrated.shell.linux": "/bin/bash", "terminal.integrated.shell.linux": "/bin/bash",
"php.validate.executablePath": "/usr/local/bin/php", "php.validate.executablePath": "/usr/local/bin/php"
"remote.portsAttributes": {
"8000": {
"label": "My Port",
"onAutoForward": "notify"
}
}
}, },
// Add the IDs of extensions you want installed when the container is created. // Add the IDs of extensions you want installed when the container is created.
@@ -37,6 +31,14 @@
// Use 'postCreateCommand' to run commands after the container is created. // Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "sudo chmod a+x \"$(pwd)\" && sudo rm -rf /var/www/html && sudo ln -s \"$(pwd)\" /var/www/html" // "postCreateCommand": "sudo chmod a+x \"$(pwd)\" && sudo rm -rf /var/www/html && sudo ln -s \"$(pwd)\" /var/www/html"
// Use 'portsAttributes' to set default properties for specific forwarded ports.
"portsAttributes": {
"8000": {
"label": "Hello Remote World",
"onAutoForward": "notify"
}
},
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode" "remoteUser": "vscode"
} }

View File

@@ -54,7 +54,7 @@ Some things to try:
- From the terminal, run `php -S 0.0.0.0:8000` - From the terminal, run `php -S 0.0.0.0:8000`
- Click "Open in Browser" in the notification that appears to access the web app on this new port. - Click "Open in Browser" in the notification that appears to access the web app on this new port.
- You can view an organized table of your forwarded ports in the 'Ports' view, which can be accessed with the command **Ports: Focus on Ports View**. - You can view an organized table of your forwarded ports in the 'Ports' view, which can be accessed with the command **Ports: Focus on Ports View**.
- Notice port 8000 in the 'Ports' view is labeled "My Port." In `devcontainer.json`, you can set `"remote.portsAttributes"`, such as a label for your forwarded ports and the action to be taken when the port is autoforwarded. - Notice port 8000 in the 'Ports' view is labeled "Hello Remote World." In `devcontainer.json`, you can set `"portsAttributes"`, such as a label for your forwarded ports and the action to be taken when the port is autoforwarded.
- Look back at the terminal, and you should see the output from your site navigations. - Look back at the terminal, and you should see the output from your site navigations.
- Edit the text on line 21 in `index.php` and refresh the page to see the changes immediately take effect. - Edit the text on line 21 in `index.php` and refresh the page to see the changes immediately take effect.
1. **Attach debugger to the server:** 1. **Attach debugger to the server:**