Skip to content

Debugging: map running component JavaScript back to authored source #117

Open

Description

@JuroOravec

Problem

A user reports that debugger support could make inline component JavaScript worth reconsidering. Debugging the script emitted to the browser is possible with normal browser tools, but that is different from setting a breakpoint in the original component source and getting useful source locations in stack traces.

The inspected component script path wraps and serves JavaScript without emitting runtime source maps back to authored component code. Existing editor source mappings do not automatically provide browser debugger mappings.

Prior art

Proposed work

  • Prototype browser debugging of both inline js and js_file, starting with plain JavaScript. Prove breakpoints, stepping, local-variable inspection, and stack locations before settling the source representation.
  • Provide development source maps through script transformations and wrappers. Compose compiler maps where available; state which transformed languages are supported.
  • Compare mapping directly into Python files with exposing virtual JavaScript sources containing the authored body. Verify browser and editor behavior rather than assuming mixed-language breakpoints work.
  • Keep script identity and maps consistent across initial-page scripts, dynamically loaded fragments, caching, and hot reload.
  • Define development enablement, production source exposure, and fallback when a transform supplies no trustworthy map. Do not produce misleading source locations.
  • Document browser DevTools first, then validate a Zed Chrome debug configuration. Investigate Helix's browser adapter compatibility separately and report verified capabilities.

Acceptance criteria

A small reproducible component supports a breakpoint in authored JavaScript, stepping, local-variable inspection, and an exception mapped to the correct source. Exercise inline and file-backed code, fragment loading, and a source edit/reload. Verify the claimed browser/editor combinations and record limitations, including whether breakpoints inside the original .py string are supported.

Use existing browser debuggers and adapters unless the prototype demonstrates a concrete missing capability. A custom Citry debug adapter is not a prerequisite. Server-side Python debugging is outside this issue.

References

Related work

Activity

  1. added
    enhancement
    on Sep 10, 2026
  2. added
    next-sprint
    on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementnext-sprint

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions