feat(list_console_messages): include source-mapped location of messages#960
feat(list_console_messages): include source-mapped location of messages#960kopalg20 wants to merge 3 commits intoChromeDevTools:mainfrom
Conversation
OrKoN
left a comment
There was a problem hiding this comment.
Thanks for the PR, could you please add tests?
| } | ||
|
|
||
| toJSONDetailed(): object { | ||
| const location = this.#getTopFrameLocation(); |
There was a problem hiding this comment.
the feature is about adding the first line of the stack to the non-detailed variants (toString(), toJSON()) so that the first source line appears in the list of console message. toJSONDetailed is not used in list_console_messages.
There was a problem hiding this comment.
Made required changes. Let me know any further improvements needed.
Also added test cases for the same. @OrKoN
…s tests according to that and also removed from message. toJSONDetailed
OrKoN
left a comment
There was a problem hiding this comment.
Tests and linter need to be fixed.
| }); | ||
| }); | ||
|
|
||
| describe('ConsoleFormatter - Source Map & Heavy Error Tests', () => { |
There was a problem hiding this comment.
these tests do not use any source maps. Can we also embed them into existing tests that already verify console message details and cover the list expectations there too?
|
Closing as stale. |
I implemented async fetching of source-mapped locations for console messages and uncaught errors.
list_console_messages remains fast and non-blocking.
get_console_message returns detailed stack traces with resolved source-mapped top frames.
Verified with 3000+ simulated errors; performance remains acceptable.
This addresses the request to show the source-mapped location for errors directly, without having to manually parse the stack trace.
Made the changes in src/formatters/ConsoleFormatter.ts