TConsole
Bring browser console to your terminal
What it does
TConsole send the browser console log to your terminal.
It also comes with a nodejs REPL so you can do some basic draft code
When to use it
While you developing your front-end app and you have to switch back and forth between IDE and browser.
How to use it?
There are two ways and it depends on your preferences
Recommended way
- Install the
tconsolebinary :npm install --save-dev tconsole( you also can install globally withnpm install -g tconsole) - Go to the entry file of your project (I.e: app.jsx for React.js or main.js for vue.js)
- Insert these two lines:
import tconsole from "t-console"; tconsole(); - You should now see your console log stream to this terminal
Note: with this approach you might want to remove two lines above in production.
By default tconsole will not run if it detects production mode using NODE_ENV, but you shouldn't rely on that.
I don't want to add dependencies to my project
- Install the
tconsolebinary :npm install -g tconsole - Start the server
tconsole - Go to your browser and open the console window
- Copy all code except for the last export line from index.js file to console
- Enter
tconsole()in side console - You should now see your console log stream to this terminal
Note: with this approach you have to do all steps 3-6 every-time you refresh your browser tab.
Advanced options
Future release
- Install using
<script/>tag - (Maybe) An extension to start tconsole on browser so we don't have to install dependencies
- (If possible) Browser console REPL instead of nodejs REPL
Description
Languages
JavaScript
100%