Put back rudimentary debug output
This commit is contained in:
@@ -5,7 +5,7 @@ use std::collections::HashSet;
|
||||
use colored::*;
|
||||
use crate::language::{ProgrammingLanguageInterface,
|
||||
ComputationRequest, ComputationResponse,
|
||||
LangMetaRequest, LangMetaResponse};
|
||||
DebugAsk};
|
||||
|
||||
mod command_tree;
|
||||
use self::command_tree::{CommandTree, BoxedCommandFunction};
|
||||
@@ -202,6 +202,16 @@ impl Repl {
|
||||
buf.push_str(&format!("{:?}\n", response.global_output_stats.stage_durations));
|
||||
}
|
||||
|
||||
|
||||
for debug_resp in response.debug_responses {
|
||||
let stage_name = match debug_resp.ask {
|
||||
DebugAsk::ByStage { stage_name } => stage_name,
|
||||
_ => continue,
|
||||
};
|
||||
let s = format!("{} - {}\n", stage_name, debug_resp.value);
|
||||
buf.push_str(&s);
|
||||
}
|
||||
|
||||
buf.push_str(&match response.main_output {
|
||||
Ok(s) => s,
|
||||
Err(e) => format!("{} {}", "Error".red(), e)
|
||||
|
||||
Reference in New Issue
Block a user