Skip to content

Expose error stack traces in list_console_messages (feasibility question) #383

Description

@Scoheart

Is your feature request related to a problem? Please describe.

Today list_console_messages returns plain console text without the error stack trace. When combining logs with LLM-based debugging, the model often can’t determine which file and line actually failed. This forces extra manual steps, guesswork, and back-and-forth context gathering—overall, not an elegant debugging experience.

Describe the solution you'd like

At a high level (no design details): the ability to optionally obtain error stack traces alongside messages returned by list_console_messages. The goal is to let tools/LLMs immediately map an error to the concrete file/function/line so they can provide accurate, actionable fixes.

Describe alternatives you've considered

Manually fetching stacks via separate DevTools/diagnostic calls and correlating them with console messages. This adds complexity, latency, and token cost.

Additional context

This capability would significantly improve automated triage and remediation in MCP-based workflows by enabling precise source localization rather than plain-text analysis.

Open questions for maintainers:

  • Does the underlying layer already capture or have access to stacks for error messages?
  • If yes, is exposing them in list_console_messages feasible?
  • If not, are there known technical/security/size constraints or an alternative path we should consider?

Thanks for considering!

Activity

  1. added theissue type on Oct 14, 2025
  2. natorion commented on Oct 14, 2025

    @natorion
    Contributor

    Thanks for the FR, we are already working on something similar.

  3. masamaru0513 commented on May 12, 2026

    @masamaru0513
    Contributor

    @natorion Is this still on the roadmap? I am interested in working on this — I recently contributed #1939 to list_console_messages, so this feels like a natural next step. get_console_message already exposes stack traces, so applying the same to list_console_messages seems feasible. Happy to take a stab at it if it's still needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions