How do I configure VS Code to show whitespace characters (tabs and spaces) to help debug indentation errors?

Responsive Ad Header

Question

Grade: Education Subject: Support
How do I configure VS Code to show whitespace characters (tabs and spaces) to help debug indentation errors?
Asked by:
108 Viewed 108 Answers
Responsive Ad After Question

Answer (108)

Best Answer
(434)
VS Code has a setting to render whitespace characters. Open VS Code settings (File -> Preferences -> Settings or Ctrl+,). Search for 'render whitespace'. Enable the 'Editor: Render Whitespace' option. You can also customize which whitespace characters are rendered (e.g., only tabs, only spaces, or both) using the 'Editor: Render Control Characters' and 'Editor: Render Whitespace' settings. This visually reveals inconsistencies.