Document Workflow
Remove copied gutter numbers from a stack trace
Remove confirmed viewer gutter numbers from stack traces while preserving frame indentation, file line and column references, ports, timestamps, status codes, and exact separators.
Written and tested by SimpleWebUtilsPublished: Reviewed:
How this workflow was checked
We replayed “Remove plain gutters while retaining stack-frame indentation” in Remove Line Numbers Online, keeping the guide's input unchanged. “Distinguish gutter numbers from diagnostic references” and “Verify frames and numeric evidence” defined the normal path; “Expecting automatic marked mode to remove plain gutters” and “Flattening frame indentation” defined the boundary review before the output was accepted.
The left gutter numbers were removed from all three lines, but source positions :42:15 and :18:7 plus the original stack indentation remained intact.
Problem
A stack trace copied from a code viewer, screenshot transcript, PDF, or review tool may contain a visual gutter such as 12 followed by a space before every real line. Those numbers interfere with searching, issue formatting, regex tests, and comparison with raw logs. Removing all digits is much worse: frame references such as user.ts:42:15, ports, HTTP statuses, timestamps, process IDs, versions, and error codes are diagnostic evidence. Whitespace is evidence too because indented frames and nested causes show structure. The safe workflow confirms that the first integer is an added gutter, removes only that prefix, preserves remaining indentation and separators, verifies diagnostic numbers, and redacts credentials before the cleaned copy leaves its authorized context.
When to use this
- Every nonblank stack-trace line begins with a copied viewer number followed by a space or tab.
- A numbered code block must be pasted into an issue, pull request, prompt, or support case as executable plain text.
- The trace contains meaningful file line and column references that must remain after cleanup.
- Frame indentation and LF, CRLF, CR, or mixed boundaries must remain available for comparison or parsing.
- An exported gutter has a stable label such as L001 | that can be tested with an anchored RE2 expression.
Steps
- Step 1
Keep the raw trace private
Save the original trace in an authorized location before editing. Preserve the exception, causes, frame order, surrounding log lines, and source application so cleanup can be compared and secrets can be redacted from a separate copy.
- Step 2
Distinguish gutter numbers from diagnostic references
Confirm that the first integer repeats as a viewer column on each targeted line. File references after paths, timestamps, ports, statuses, process IDs, and numbers inside messages belong to the trace and must not be selected.
- Step 3
Choose Plain gutter explicitly
All marked formats does not remove an unpunctuated prefix such as 12 TypeError. Select Plain gutter only after confirming the layout; it removes the leading integer plus one separator and preserves additional frame indentation.
- Step 4
Compare cleanup evidence
Check prefixes removed against nonblank lines and inspect unmatched lines rather than forcing them through a broader rule. Confirm the reported LF, CRLF, CR, or mixed state and whether a terminal line ending remained.
- Step 5
Verify frames and numeric evidence
Compare the exception line, a middle frame, a nested cause, and the final frame with the raw trace. Paths, :line:column references, indentation, status codes, ports, versions, and timestamps should match exactly.
- Step 6
Redact and test the shared copy
Remove tokens, cookies, credentials, private URLs, and personal data from the cleaned copy according to policy. Paste a sample into the issue tracker, parser, regex tool, or prompt and verify formatting before sharing the full authorized excerpt.
Example
Remove plain gutters while retaining stack-frame indentation
Input
12 TypeError: Cannot read properties of undefined
13 at renderUser (/app/src/user.ts:42:15)
14 at async GET (/app/src/route.ts:18:7)Output
TypeError: Cannot read properties of undefined
at renderUser (/app/src/user.ts:42:15)
at async GET (/app/src/route.ts:18:7)Common mistakes
Expecting automatic marked mode to remove plain gutters
Plain integers are ambiguous, so automatic mode leaves them untouched. Confirm the copied column and select Plain gutter explicitly.
Deleting every number in the trace
Global number removal destroys line and column references, timestamps, status codes, ports, process IDs, and versions needed to reproduce the failure.
Flattening frame indentation
Built-in cleanup removes one separator after the gutter and retains additional spaces. Keep that structure unless the destination parser has a documented different requirement.
Forcing one pattern over unmatched context lines
Wrapped messages or copied headers may lack the gutter. Review unmatched lines individually instead of broadening the rule until it removes valid content.
Sharing secrets because processing was local
Local cleanup does not make the destination private. Redact authorization headers, tokens, cookies, customer data, and internal addresses before posting the trace elsewhere.
FAQ
Why must I select Plain gutter for 12 TypeError?
An unpunctuated leading number can be real content. The explicit choice records that you verified it as a viewer gutter instead of letting automatic mode guess.
Will user.ts:42:15 remain in the trace?
Yes. Built-in removal targets only the confirmed prefix at the start of the line. File line and column references later in the frame remain unchanged.
Why are four spaces still present before at renderUser?
The gutter is followed by one separator and then the original frame indentation. Removing one separator while preserving the remaining spaces keeps the stack structure readable.
What should I do with a gutter such as L001 |?
Test a bounded expression such as ^L\d{3} [|] on a redacted sample. Custom mode uses RE2, requires ^, rejects empty matches, and removes the complete match.
Can line-ending preservation make the issue tracker keep CRLF?
The tool preserves the source separators in its output and download. The clipboard target or issue tracker may normalize them, so verify the pasted result when exact separators matter.
Which trace values should be redacted before sharing?
Remove credentials, tokens, cookies, personal data, private hostnames or paths, and sensitive query values according to your policy while retaining enough non-secret frame context to diagnose the error.