Merge branch 'master' of https://github.com/Microsoft/vscode-remote-try-php into clantz/1.41
This commit is contained in:
		@@ -1,5 +1,5 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	"name": "PHP 7",
 | 
						"name": "PHP Sample",
 | 
				
			||||||
	"dockerFile": "Dockerfile",
 | 
						"dockerFile": "Dockerfile",
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	// Use 'settings' to set *default* container specific settings.json values on container create. 
 | 
						// Use 'settings' to set *default* container specific settings.json values on container create. 
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										14
									
								
								.vscode/launch.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								.vscode/launch.json
									
									
									
									
										vendored
									
									
								
							@@ -8,6 +8,20 @@
 | 
				
			|||||||
            "program": "${workspaceFolder}/index.php",
 | 
					            "program": "${workspaceFolder}/index.php",
 | 
				
			||||||
            "cwd": "${workspaceFolder}",
 | 
					            "cwd": "${workspaceFolder}",
 | 
				
			||||||
            "port": 9000
 | 
					            "port": 9000
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            "name": "Listen for XDebug",
 | 
				
			||||||
 | 
					            "type": "php",
 | 
				
			||||||
 | 
					            "request": "launch",
 | 
				
			||||||
 | 
					            "port": 9000
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            "name": "Launch currently open script",
 | 
				
			||||||
 | 
					            "type": "php",
 | 
				
			||||||
 | 
					            "request": "launch",
 | 
				
			||||||
 | 
					            "program": "${file}",
 | 
				
			||||||
 | 
					            "cwd": "${fileDirname}",
 | 
				
			||||||
 | 
					            "port": 9000
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
							
								
								
									
										16
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								README.md
									
									
									
									
									
								
							@@ -2,7 +2,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
This is a sample project that lets you try out the **[VS Code Remote - Containers](https://aka.ms/vscode-remote/containers)** extension in a few easy steps.
 | 
					This is a sample project that lets you try out the **[VS Code Remote - Containers](https://aka.ms/vscode-remote/containers)** extension in a few easy steps.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
> **Note:** If you're following the quick start, you can jump to the [Things to try](#things-to-try) section. 
 | 
					> **Note:** If you're following the quick start, you can jump to the [Things to try](#things-to-try) section.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Setting up the development container
 | 
					## Setting up the development container
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -34,19 +34,27 @@ Some things to try:
 | 
				
			|||||||
   - Open `index.php`
 | 
					   - Open `index.php`
 | 
				
			||||||
   - Try adding some code and check out the language features.
 | 
					   - Try adding some code and check out the language features.
 | 
				
			||||||
1. **Terminal:** Press <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>\`</kbd> and type `uname` and other Linux commands from the terminal window.
 | 
					1. **Terminal:** Press <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>\`</kbd> and type `uname` and other Linux commands from the terminal window.
 | 
				
			||||||
1. **Build, Run, and Debug:**
 | 
					1. **Run and Debug:**
 | 
				
			||||||
   - Open `index.php`
 | 
					   - Open `index.php`
 | 
				
			||||||
   - Add a breakpoint (e.g. on line 4).
 | 
					   - Add a breakpoint (e.g. on line 4).
 | 
				
			||||||
   - Press <kbd>F5</kbd> to launch the app in the container.
 | 
					   - Press <kbd>F5</kbd> to launch the app in the container.
 | 
				
			||||||
   - Once the breakpoint is hit, try hovering over variables, examining locals, and more.
 | 
					   - Once the breakpoint is hit, try hovering over variables, examining locals, and more.
 | 
				
			||||||
1. **Running a server:**
 | 
					1. **Running a server:**
 | 
				
			||||||
   - From the terminal, run `php -S localhost:8000`
 | 
					   - From the terminal, run `php -S 0.0.0.0:8000`
 | 
				
			||||||
   - Press <kbd>F1</kbd> and run the **Remote-Containers: Forward Port from Container...** command.
 | 
					   - Press <kbd>F1</kbd> and run the **Remote-Containers: Forward Port from Container...** command.
 | 
				
			||||||
   - Select port `8000`.
 | 
					   - Select port `8000`.
 | 
				
			||||||
   - Click "Open Browser" in the notification that appears to access the web app on this new port.
 | 
					   - Click "Open Browser" in the notification that appears to access the web app on this new port.
 | 
				
			||||||
   - 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 affect
 | 
					   - Edit the text on line 21 in `index.php` and refresh the page to see the changes immediately take affect
 | 
				
			||||||
 
 | 
					1. **Attach debugger to the server:**
 | 
				
			||||||
 | 
					   - Follow the previous steps to start up a PHP server and open a browser on port `8000`
 | 
				
			||||||
 | 
					   - Press <kbd>F1</kbd> and select the **View: Show Debug** command
 | 
				
			||||||
 | 
					   - Pick "Listen for XDebug" from the dropdown
 | 
				
			||||||
 | 
					   - Press <kbd>F5</kbd> to attach the debugger
 | 
				
			||||||
 | 
					   - Add a breakpoint to `index.php` if you haven't already
 | 
				
			||||||
 | 
					   - Reload your browser window
 | 
				
			||||||
 | 
					   - Once the breakpoint is hit, try hovering over variables, examining locals, and more.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Contributing
 | 
					## Contributing
 | 
				
			||||||
 | 
					
 | 
				
			||||||
This project welcomes contributions and suggestions. Most contributions require you to agree to a
 | 
					This project welcomes contributions and suggestions. Most contributions require you to agree to a
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user