CP Debug Printer
Auto-generate cerr debug print statements for C++ competitive programming variables.
Usage
- Click on any variable name in your C++ file
- Press
Ctrl+Shift+D
- 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.
| |