You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Console error "Show Traceback" link does not change to "Hide Traceback" #19645
On a Console error, clicking "Show Traceback" shows the call list, but the link keeps saying "Show Traceback" when it should say "Hide Traceback". Reproduced on RStudio Server built from main (8df4792) with R 4.6.2 and default settings.
ConsoleError.setTracebackVisible() (ConsoleError.java) only looks at the error box's direct child elements:
NodeList<Node> children = this.getElement().getChildNodes();
...
if (child.hasClassName("show_traceback_text")) {
... child.setInnerText(constants_.hideTracebackText()) ...
}
elseif (child.hasClassName("stack_trace")) { ... }
stack_trace is a direct child, so the traceback is shown and hidden. show_traceback_text is two levels further down, inside the commands panel (ConsoleError.ui.xml), so the loop never reaches it and its text never changes.
This probably started in a052bdd (first in 2021.09.0). That commit replaced showTracebackText.setText(...) with walking the DOM, to work with the virtual scroller's raw-JavaScript handling of Console output. A fix probably needs to search the whole subtree (for example, querySelector(".show_traceback_text") on the error element) rather than go back to the @UiField.
Expected: the call list appears and the link says "Hide Traceback". Actual: the call list appears, but the link still says "Show Traceback". Clicking it again hides the list, so the toggle works and only the label is wrong.
A top-level stop("boom") isn't a useful repro. With the default setting (traceback for user code only), RStudio sends no traceback when there are fewer than two calls (SessionErrors.R, recordTraceback), so the list is empty and nothing visibly changes.
changed the title [-]Console error "Show Traceback" link may not change to "Hide Traceback"[/-][+]Console error "Show Traceback" link does not change to "Hide Traceback"[/+]on Nov 16, 2026
Activity
[-]Console error "Show Traceback" link may not change to "Hide Traceback"[/-][+]Console error "Show Traceback" link does not change to "Hide Traceback"[/+]Replace stale VirtualScroller comment in ConsoleError
Fix "Show Traceback" link not changing to "Hide Traceback" (#19669)