CSS in VS Code

Debug CSS

Learn to trace unmatched selectors, paths and overridden rules and repair the cause rather than adding random overrides in this beginner-friendly Visual Studio Code lesson.

Learning outcomes

  • Explain how to trace unmatched selectors, paths and overridden rules.
  • Complete the guided activity safely.
  • Check that you can repair the cause rather than adding random overrides.

Before you begin

Use a non-sensitive practice folder, inspect unfamiliar code before trusting it, and never place passwords, tokens or private information in project files.

Open official guidance ↗

Step-by-step instructions

  1. Open the intended practice workspace in Visual Studio Code and confirm its folder name and Workspace Trust state.
  2. Diagnose a deliberately missing style.
  3. Save the relevant files and review the Problems panel, terminal, Source Control view or browser preview as appropriate.
  4. Check filenames, relative paths, console messages, keyboard use, mobile layout and privacy before continuing.
  5. Confirm that you can repair the cause rather than adding random overrides, then create a clear commit, backup or saved checkpoint.
Ian's practical tip: Work in one named project folder, preview after small changes, read the actual error message and keep a recoverable version before broad edits.

Practical activity

Diagnose a deliberately missing style. The expected result is to repair the cause rather than adding random overrides.

Completion checklist