[GH-ISSUE #442] Debug console doesn't open #112

Closed
opened 2026-03-02 23:44:38 +03:00 by kerem · 3 comments
Owner

Originally created by @Quackzoer on GitHub (Dec 27, 2025).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/442

I couldn't find anything in the code about that. At the end of this https://github.com/sst/opentui/blob/main/packages/core/docs/development.md it's mentioned that I can open console using backtick, meanwhile nothing happens for me. I tried creating completely clear project, tried couple differents terminals (all windows, cmd, powershell, windows terminal). Tried defining my own shortcuts in new project to open console which also didn't help. What's strange is that I can log all keys and they are being recorded correctly.

To recreate simply create new project and try to open console with backtick.

  "dependencies": {
    "@opentui/core": "^0.1.63",
    "@opentui/react": "^0.1.63",
    "react": "^19.2.3"
  }
Originally created by @Quackzoer on GitHub (Dec 27, 2025). Original GitHub issue: https://github.com/anomalyco/opentui/issues/442 I couldn't find anything in the code about that. At the end of this https://github.com/sst/opentui/blob/main/packages/core/docs/development.md it's mentioned that I can open console using backtick, meanwhile nothing happens for me. I tried creating completely clear project, tried couple differents terminals (all windows, cmd, powershell, windows terminal). Tried defining my own shortcuts in new project to open console which also didn't help. What's strange is that I can log all keys and they are being recorded correctly. To recreate simply create new project and try to open console with backtick. ```json "dependencies": { "@opentui/core": "^0.1.63", "@opentui/react": "^0.1.63", "react": "^19.2.3" } ```
kerem closed this issue 2026-03-02 23:44:38 +03:00
Author
Owner

@msmps commented on GitHub (Dec 27, 2025):

I couldn't find anything in the code about that. At the end of this https://github.com/sst/opentui/blob/main/packages/core/docs/development.md it's mentioned that I can open console using backtick ...

this isn't a default behaviour! there's a common helper function for this in the examples (might be where the confusion comes from)

<!-- gh-comment-id:3693867578 --> @msmps commented on GitHub (Dec 27, 2025): > I couldn't find anything in the code about that. At the end of this https://github.com/sst/opentui/blob/main/packages/core/docs/development.md it's mentioned that I can open console using backtick ... this isn't a default behaviour! there's a [common helper function](https://github.com/sst/opentui/blob/ca63835012d6506c7f5ee579ca1041699344b0a2/packages/core/src/examples/lib/standalone-keys.ts#L5-L7) for this in the examples (_might be where the confusion comes from_)
Author
Owner

@msmps commented on GitHub (Dec 27, 2025):

import { createCliRenderer } from "@opentui/core";
import { createRoot, useKeyboard, useRenderer } from "@opentui/react";
import { useEffect } from "react";

function App() {
  const renderer = useRenderer();

  useEffect(() => {
    console.log("Hello, world!");
  }, []);

  useKeyboard((key) => {
    if (key.name === "`") {
      renderer.console.toggle();
    }
  });

  return <text>Press ` to toggle the console</text>;
}

const renderer = await createCliRenderer();
createRoot(renderer).render(<App />);
<!-- gh-comment-id:3693869562 --> @msmps commented on GitHub (Dec 27, 2025): ```tsx import { createCliRenderer } from "@opentui/core"; import { createRoot, useKeyboard, useRenderer } from "@opentui/react"; import { useEffect } from "react"; function App() { const renderer = useRenderer(); useEffect(() => { console.log("Hello, world!"); }, []); useKeyboard((key) => { if (key.name === "`") { renderer.console.toggle(); } }); return <text>Press ` to toggle the console</text>; } const renderer = await createCliRenderer(); createRoot(renderer).render(<App />); ```
Author
Owner

@Quackzoer commented on GitHub (Dec 27, 2025):

import { createCliRenderer } from "@opentui/core";
import { createRoot, useKeyboard, useRenderer } from "@opentui/react";
import { useEffect } from "react";

function App() {
const renderer = useRenderer();

useEffect(() => {
console.log("Hello, world!");
}, []);

useKeyboard((key) => {
if (key.name === "`") {
renderer.console.toggle();
}
});

return Press ` to toggle the console;
}

const renderer = await createCliRenderer();
createRoot(renderer).render();

Haven't seen it... For some reason it worked even tho I already tried to assign my own keybinds. Must have done something wrong. Thanks a lot!

<!-- gh-comment-id:3693902924 --> @Quackzoer commented on GitHub (Dec 27, 2025): > import { createCliRenderer } from "@opentui/core"; > import { createRoot, useKeyboard, useRenderer } from "@opentui/react"; > import { useEffect } from "react"; > > function App() { > const renderer = useRenderer(); > > useEffect(() => { > console.log("Hello, world!"); > }, []); > > useKeyboard((key) => { > if (key.name === "`") { > renderer.console.toggle(); > } > }); > > return <text>Press ` to toggle the console</text>; > } > > const renderer = await createCliRenderer(); > createRoot(renderer).render(<App />); Haven't seen it... For some reason it worked even tho I already tried to assign my own keybinds. Must have done something wrong. Thanks a lot!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#112
No description provided.