Compare two files in VS Code.
Section: Search, Terminal, and CLI
Open a diff view from the CLI
bash
bash
code --diff old-file.ts new-file.tsLearn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Search, Terminal, and CLI