Debug logs & cleanup

Insert language-aware logs, clean them up, and generate launch.json.

Insert Debug Log

  1. Put the cursor on a variable (several cursors work too).
  2. Press Ctrl+Alt+Shift+L, or right-click and choose Insert Debug Log.
  3. A log line labelled with the file and line is added after the statement that sets the variable.

Works in JavaScript, TypeScript, Python, Java, Kotlin, C#, Dart and Swift, and uses the logger the file already has: logger.debug (Python logging), log.debug (SLF4J / Lombok), _logger.LogDebug (ILogger), Log.d (Android), debugPrint (Flutter) or os.Logger (Swift). Otherwise it falls back to console.log, print, System.out.println or Console.WriteLine.

Clean Debug Logs

  • DevSnip Pro: Clean Debug Logs lists leftover log calls across the workspace โ€” including <script> blocks in HTML, Vue, Svelte and PHP โ€” and removes the ones you choose. Calls inside comments and strings are ignored.
  • DevSnip Pro: Remove Debug Logs in This File does the same for the open editor; Undo reverts it.
  • Set devsnip.consoleLogCleanup.confirmBeforeDelete to false to skip the confirmation.

More cleanup and setup tools

CommandWhat it does
Run & Debug ConfigurationsDetects Next.js, Vite, NestJS, FastAPI, Django, Spring Boot, .NET, Flutter and more, and writes .vscode/launch.json, tasks.json and extensions.json
Remove Unused ImportsJavaScript, TypeScript, Python, Java and Kotlin
Unused DependenciesLists npm, Python and Flutter/Dart packages nothing uses, with the command to remove them
Dependencies & InstallationDeclared, installed and newest versions for npm, yarn, pnpm, pip, Maven, Gradle, NuGet and pub