Exercise 2: Your First Task — Possible Solution ==================================================================== STEPS ------------------------------ 1. In your project's root, create a .vscode folder if one doesn't already exist (reusing the same folder from Chapter 5's settings.json/extensions.json). 2. Inside it, create tasks.json with: { "version": "2.0.0", "tasks": [ { "label": "Build", "type": "shell", "command": "echo Build complete" } ] } 3. Save the file. 4. Press Ctrl+Shift+P to open the Command Palette (Chapter 2), type "Tasks: Run Task", and press Enter. 5. A list appears showing "Build" (the label from the JSON) as an option. Select it. 6. A new terminal opens automatically and runs "echo Build complete", printing "Build complete" — without you ever typing that command directly into a terminal yourself. WHY THIS WORKS AS AN ANSWER ------------------------------ This reuses the chapter's own tasks.json structure exactly — the "version", "tasks" array, "label", "type": "shell", and "command" fields are all directly copied from the chapter's own worked Build task example, just with a trivial echo command standing in for a real build command like npm run build, to keep this exercise runnable without any specific project setup required. Running it via "Tasks: Run Task" rather than typing "echo Build complete" directly into a terminal is the entire point being practiced here: the command itself now lives in a saved, version- controllable file, reachable by its label through the Command Palette — precisely the "turns a repeated command into a one-click action" benefit the chapter opens this section with.