Search code examples
reactjsintellij-idea

Where is the console in intellij IDEA


I am using React to create a simple app in Intellij IDEA. I simply cannot find anywhere that something logged to the console will display.

Here is my simple code

import './App.css';

function App() {
 const handleClick = () => {
   console.log("Hello World");
 }

 return (
   <div className="App">
     <header className="App-header">
       <button onClick={handleClick}>Click me</button>
     </header>
   </div>
 );
}

export default App;

Where in the IDE (or anywhere else) can I see the Hello World pop out? I have tried the Debug window in View->Tool Windows->Debug.


Solution

  • Since this is using React, the console.log output should show up in your browser's Inspector window. On most browsers, you can right-click anywhere in the webpage, and click "Inspect" in the menu.

    However, if you're just looking for the IntelliJ IDEA terminal, you can check both your left and right sidebars for this icon:

    The Terminal icon on IntelliJ idea

    If you can't find it, you can also open View > Tool Windows > Terminal.