DevTools: Display console messages and errors (#32727)

* feat: add streams to browsing context

* feat: console now works!

* feat: order console messages

* feat: add streams to new browsing contexts

* fix: apply suggestions

Co-authored-by: Martin Robinson <mrobinson@igalia.com>

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
eri 2024-07-09 20:27:47 +02:00 committed by GitHub
parent 34d9be70f9
commit 33f3c34d28
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 141 additions and 119 deletions

View file

@ -282,23 +282,21 @@ pub struct PageError {
pub private: bool,
}
#[derive(Debug, Deserialize, Serialize)]
pub struct ConsoleAPI {
#[serde(rename = "_type")]
pub type_: String,
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct ConsoleLog {
pub level: String,
pub filename: String,
pub line_number: u32,
pub function_name: String,
pub column_number: u32,
pub time_stamp: u64,
pub private: bool,
pub arguments: Vec<String>,
// pub stacktrace: Vec<...>,
}
#[derive(Debug, Deserialize, Serialize)]
pub enum CachedConsoleMessage {
PageError(PageError),
ConsoleAPI(ConsoleAPI),
ConsoleLog(ConsoleLog),
}
#[derive(Debug, PartialEq)]