{
if (programmatic.current) return;
const el = e.currentTarget;
const atEnd = el.scrollHeight - el.scrollTop - el.clientHeight < 24;
if (atEnd !== stick.current) setFollow(atEnd);
}}
onContextMenu={onContextMenu}
role="log"
onKeyDown={onOutputKeyDown}
aria-label={tx("Debug console")}
tabIndex={0}
>
{!lines?.length && session.launch?.request === "attach" && (
The attached process may not provide standard output to the debugger.
)}
{virtualizer.getVirtualItems().map((item) => {
const l = lines?.[item.index];
if (!l) return null;
// As in the Run console: a whole-line rule replaces the level colour.
const ruled = matchConsoleRules(l.text, l.category, consoleRules);
const color = ruled?.line ? ruled.line.fg : logLineColor(l.text, l.category, logColors);
return (
);
})}