Console NinjaConsole Ninja is a VS Code extension that displays Current statusConsole Ninja is available for everyone to use for free. It's still very early days for the product, so we would appreciate if you let us know about any issues/bugs that you may find as well as any feature requests that you may have. While we will probably commercialize Console Ninja at some point, we don't have any immediate plans to do so. Regardless, we plan to always have a free version available and any commercial offering would probably provide more advanced features. Supported technologiesConsole Ninja currently supports the following tools:
We have designed Console Ninja in such a way that adding support for new tools is fast and easy, so please let us know if there's another technology you want to use Console Ninja with. Get startedConsole Ninja is designed to fit seamlessly into most typical dev workflows. After you have installed the extension in VS Code and opened your project, you may perform the same steps you usually take:
* Most modern tools run in watch mode with hot reload enabled. If your tool doesn't have such mode, then, the same way as without Console Ninja, you need to refresh your app page to make it run your modified code. ** Sometimes your modified code may be triggered immediately upon the (hot) reload of the app. For example, when code is located in the root of a component, it will be executed when the app (re)starts. If the modified code is not triggered by the app (re)start, then, the same way as without Console Ninja, you will need to perform your app specific actions to trigger the code execution. You should now be able to see logs (and errors, if any) in your editor, next to the relevant line of code. Hovering over the Using the Log viewerUsing the Each log entry provides summary details and is collapsed by default, providing a short preview that can be expanded (via mouse or Each entry preview and expanded error entry details contains clickable links to the target source code. Links that point to The following keyboard shortcuts are supported for faster navigation:
Additionally, the following commands (also displayed as icon buttons at the top of the log viewer) are available:
The log viewer supports search using the The log viewer can be displayed in two modes, either In the In the TroubleshootingIf Console Ninja is not working for you as expected, the first thing to check is the extension status. You may see the status info by hovering over the extension icon in VS Code status bar. The status popup information dialog explains the current state of the tool and provides some tips on what to do next. How does it workConsole Ninja integrates with locally installed tools that are building/preparing your code, and then inspects and adjusts your code (in a way that doesn't change how it executes) before it gets to the runtime (browser or node process that runs the code). To integrate with supported tools seamlessly, Console Ninja patches your locally installed node modules. When you stop Console Ninja in the editor with the Console Ninja detects if you are running your tool in production mode (by checking CLI flags and process environment variables). When production mode is detected, the tool will not modify your application code even if Console Ninja is running. In the (unlikely) case that you are running production builds on your local dev computer and are deploying or sharing local builds outside of your machine, we recommend running the Console Ninja Console Ninja instrumentation is limited to sending runtime values for
Differences between Console Ninja and other toolsQuokka.jsQuokka.js is another awesome tool from our team. Like Console Ninja, Quokka.js allows you to see various execution results without leaving the comfort of your editor. The fundamental difference between Console Ninja and Quokka.js is that Quokka runs new scratch files or existing code files as a self-contained program. Quokka allows you to quickly execute and iterate code in an isolated playground without unnecessary application execution. Console Ninja on the other hand runs within your application (started by your dev server, or test runner), and allows you to debug any end to end scenarios within your running app. Wallaby.jsThe Wallaby.js tool from our team runs your JavaScript and TypeScript tests immediately as you type, highlighting results in your IDE right next to your code. While you may use Console Ninja to display logs from supported test runner CLIs, test errors are not handled by Console Ninja; this is because test errors are caught/handled by test runners themselves, and special processing is required to format and display test results. Wallaby not only displays logs and test errors inline (and in a separate ergonomically designed view), but is also packed with features, such as inline code coverage and a time travel debugger, that provide superpowers to your current testing framework/stack, such as Jest, Vitest, Mocha. etc. Error Lens extensionError Lens is a VS Code extension that provides inline output for VS Code In contrast, Console Ninja runs within your application and displays runtime logs and errors. |