Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>cp-debug-printerNew to Visual Studio Code? Get it now.
cp-debug-printer

cp-debug-printer

Aviraj29

|
1 install
| (0) | Free
Auto-generate cerr debug print statements for C++ competitive programming variables
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CP Debug Printer

Auto-generate cerr debug print statements for C++ competitive programming variables.

Usage

  1. Click on any variable name in your C++ file
  2. Press Ctrl+Shift+D
  3. Debug print is inserted on the next line automatically

Supported Types

  • int, long long, string → cerr << "n: " << n << "\n";
  • vector<int> → iterates and prints all elements
  • vector<vector<int>> → prints 2D grid row by row
  • map<int,int> → prints key->value pairs
  • set<int> → prints all elements
  • stack<int> → prints all elements
  • queue<int> → prints all elements
  • pair<int,int> → prints {first, second}

Why?

In competitive programming, cerr prints to stderr which the judge ignores — so you can leave debug lines in your code and submit safely.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft