hightail
hightail copied to clipboard
Make Hightail a good tool for debugging
This is far-fetched and might not be possible to do / to do right. But I'm thinking about something along the lines of:
- the user has a macro like #define DBG(x) cout << "DBG: " << #x << " = " << x << endl;
- we ignore (in diffing) lines beginning with DBG, but in diff view, we truncate the "DBG: " and display the lines in green, or something.
- or, we could display everything that came from stderr in green (however, can we sync it with what came from stdout and display both things in the same textarea?) Don't know if this would be usable.
Currently, we're not displaying the standard error output anywhere to the user; we could at least do that. (Display it where? The table is wide as it is.)
A simpler solution could be just to ignore any lines starting with "DBG", and print them as they are.
The only problem is that Hightail takes in the output string by string, so debug statements with spaces would create a problem.
Actually, I'm wondering if it could be possible to display the cerr output of the program (don't use it for diffing, just for displaying), say in green. My vision is that it should be intertwined with the output of the program, just as it would be if displayed when run in the console. My first thought is that it would be hard, since we can't say which line "came first", but the console does manage to display it in the right order somehow, so maybe we could as well. I didn't research it (and whether it is possible in Java) though.
See also here http://codeforces.com/blog/entry/13141#comment-210682