Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>kill-console-logNew to Visual Studio Code? Get it now.
kill-console-log

kill-console-log

Laxman Shinde

|
3 installs
| (0) | Free
This extention remove the console logs from your code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Kill Console Log VS Code Extension

Remove console.log statements from your code easily!

Overview

Kill Console Log is a Visual Studio Code extension designed to quickly and reliably remove all console.log statements from your JavaScript/TypeScript files—either in the active editor or across your entire project directory. It’s perfect for cleaning up debugging logs before releasing code.


Features

  • Remove Console Logs from Active File
    Instantly deletes all console.log statements and cleans up their lines from the currently open file in your editor.
  • Remove Console Logs from Entire Project
    Scans your workspace for all JS/TS source files and removes every console.log—including complex, multi-line, and various formatting scenarios.
  • Works on JavaScript (js, jsx) and TypeScript (ts, tsx) files
  • Handles multi-line and nested console.logs, whitespace, comments, and complex code
  • Safe and automatic file save after modification

Commands

Command Palette Title Description
remove-console-logs-from-code.readActiveFile Remove Console Logs from Active File Cleans up all console.log statements from the current file
remove-console-logs-from-code.removeFromProject Remove Console Logs from Entire Project Cleans up console.log statements project-wide

Usage

  1. Install the extension (development mode or marketplace).
  2. Open a JavaScript or TypeScript file.
  3. Open the Command Palette (Ctrl+Shift+P) and search for:
    • Remove Console Logs from Active File
    • Remove Console Logs from Entire Project
  4. Select the command and let the extension do the cleanup!
  5. Modified files are automatically saved.


Installation

Coming soon to the VS Code marketplace!
For development: clone this repo, run pnpm install, then press F5 in VS Code.


Development

  • Written in TypeScript
  • Organized with modular commands (readActiveFile, removeFromProject)
  • Uses robust regular expressions and line parsing to handle complex code

Configuration

You can configure your include/exclude file patterns in removeConsoleLogsFromProject.ts if you want to support or limit specific file types.


Contributing

Pull requests and issues welcome! If you find bugs with complex log formats or need support for other languages, please open an issue or PR.


License

MIT


Author

Laxman Shinde

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft