Add some keyboard shortcut i.e. Ctrl+K that takes a line and turns it into valid "printf" debugging code.
It takes in "commands" and converts them into working code.
Here is how the commands should work:
d, <var/expr>, [alias]: does something akin to cout << #x << (x) << ' '; except #x is replaced by the alias if it's specified
l, <label>: does something akin to cout << '[' << x << "] "; except x is <label>.
l2, <label>: Same thing as l except normal brackets are used instead of square ones
More to come!
To separate commands, use semicolons. Her e is an example:
l, addition; d, a; d, b; d, a+b, sum;
with a=2 and b=5 would print: [addition] a=2, b=5, sum=7
Add some keyboard shortcut i.e.
Ctrl+Kthat takes a line and turns it into valid "printf" debugging code.It takes in "commands" and converts them into working code.
Here is how the commands should work:
d, <var/expr>, [alias]: does something akin tocout << #x << (x) << ' ';except#xis replaced by the alias if it's specifiedl, <label>: does something akin tocout << '[' << x << "] ";exceptxis<label>.l2, <label>: Same thing aslexcept normal brackets are used instead of square onesMore to come!
To separate commands, use semicolons. Her e is an example:
with
a=2andb=5would print:[addition] a=2, b=5, sum=7