Script Valley
Developer Environment Setup (WSL, Terminal, VS Code)
VS Code Setup and WSL2 Integration/Assessment

Practice & Assessment

Test your understanding of VS Code Setup and WSL2 Integration

Multiple Choice Questions

5
1

A developer opens VS Code by running code . from their WSL2 terminal. What does the green status bar in the bottom-left corner indicate when connected correctly?

2

What is the difference between User Settings and Workspace Settings in VS Code?

3

Which launch.json property tells the VS Code debugger to keep the Node.js process alive and restart automatically when files change?

4

A developer installs the Prettier extension but format on save is not working. They have editor.formatOnSave set to true. What is the most likely missing configuration?

5

What keyboard shortcut opens the VS Code Command Palette?

Coding Challenges

1
1

VS Code Workspace Configuration Generator

Write a Node.js script called setup-vscode.js that, when run from a project directory, creates a .vscode/ folder containing: (1) settings.json with formatOnSave, tabSize 2, defaultFormatter prettier, and trimTrailingWhitespace, (2) launch.json with two debug configurations: a simple Node launch and a nodemon launch, (3) extensions.json with recommendations for prettier, eslint, and errorlens. If .vscode/ already exists, the script should merge new keys rather than overwrite. Use fs.existsSync, JSON.parse, and JSON.stringify with 2-space indent. Input: none (operates on cwd). Output: created or updated .vscode files with console confirmation. Time estimate: 20-25 minutes.

Medium

Mini Project

1

Fully Configured VS Code Project Template

Create a reusable project template generator. Write a shell script create-project.sh that takes a project name as an argument and sets up: (1) ~/projects/name directory with src/, tests/, and .vscode/ subdirectories, (2) .vscode/settings.json with formatOnSave, zsh terminal, tabSize 2, and defaultFormatter prettier, (3) .vscode/launch.json with Node and nodemon debug configs, (4) .vscode/extensions.json with recommended extension IDs, (5) src/index.js with a minimal Express hello-world server, (6) package.json via npm init -y with start, dev (nodemon), and test scripts, (7) README.md documenting npm scripts, (8) .gitignore covering node_modules, .env, dist/, (9) git init with an initial commit. The script must print a step-by-step success log and exit cleanly if the directory already exists.

Hard