- Solace is a modern console replacement. Written in C++03
- Solace is HTML/Ajax based.
- Solace is zlib/libpng licensed.
- Interactive REPL interface.
- Built-in code editor.
- Ajax queries.
- Logging.
- Stacktraces.
- Filtering.
- Tweakables.
- Extending viewers for custom data.
- Histograms (inputs). VNC outputs. Monkey testing. Maybe D3js.
- Profilers. Maybe trace-viewer.
- Code/Data visualization. Maybe D3js.
- Save/Load Screenshots/thumbnails. Maybe any JQuery/lightbox gallery.
- Save/Load Command history.
- Framebuffer viewer. Maybe NativeWebSocketRender.
- Stats.
- Leaks.
~solace> cat sample.cc
#include <iostream>
#include <string>
#include <stdio.h>
#include "solace.hpp"
#ifdef _MSC_VER
# define popen _popen
# define pclose _pclose
#endif
std::string evaluate( const std::string &cmd ) {
std::string answer;
FILE *f = popen( cmd.c_str(), "r" );
if( f ) {
char buff[2048];
while( fgets(buff, 2048, f) ) answer += buff;
pclose(f);
}
return answer;
}
int main() {
// install solace html server
solace::webinstall( 8080, &evaluate );
// write to our log
solace::cout << "Succesfully installed! " << 123 << std::endl;
// capture std::cout and log it from here
solace::capture( std::cout );
std::cout << "Succesfully captured! " << 456 << std::endl;
// do whatever
for( std::string s; std::getline(std::cin, s); )
{}
// restore std::cout stream
solace::release( std::cout );
}
~solace> ./a.out
Succesfully installed! 123
Succesfully captured! 456
cl *.cc *.cpp -I deps deps\route66\route66.cpp deps\heal\*.cpp /Zi /DNDEBUG /Oy-
- Solace, zlib/libpng licensed.
- Original Lovebird HTML template by rxi, MIT licensed.
- Original WebDebugMenu by i-saint, CC-BY licensed.
- Full Ace.js code editor by Ajax.org B.V., BSD licensed.
- Borrowed some ideas and javascript code from Herman Tulleken and Maxime Euzière, both unlicensed.