Proposal for a visual debug mode
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 56.1k
- Forks
- 1.7k
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 22
Description
Description
This likely borders on something that could be achieved with a package, but integrating it into the compiler might also make sense, depending on the scope. So I'm proposing the idea here.
When setting layouts, it is often difficult to determine where a particular (possibly unwanted) spacing comes from or what the dimensions/indents etc. of a single element are. Of course, you can use fills and strokes to some degree, but this is often burdensome or doesn't show the whole picture in an easy-to-overview manner.
Similar to the inspector in HTML/CSS environments or tools like geometry/showframe or lua-visual-debug in the LaTeX universe, a debug mode would be very useful.
This mode could show, for example:
- Outlines of blocks and page parts without affecting the layout
- Dimensions and x/y position of blocks and boxes without affecting content or layout
- Spacings and paddings for each element
- Whitespace, line and page breaks
- Baselines and lines per element
- Broken characters
Use Case
This approach would make debugging more intuitive, significantly reducing support requests and enhancing ease of use.
Rudimentary examples (not showing many possible features mentioned above):
Image Source: https://tex.stackexchange.com/questions/2083/how-can-i-visualize-boxes
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The proposal does not name any files, tests, or compiler entry points to inspect. Start by determining whether the functionality belongs in the compiler or an external package, then define a focused initial scope and acceptance criteria for the visual debug output before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100