Debug logs & cleanup
Insert language-aware logs, clean them up, and generate launch.json.
Insert Debug Log
- Put the cursor on a variable (several cursors work too).
- Press Ctrl+Alt+Shift+L, or right-click and choose Insert Debug Log.
- 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. (Python logging), log. (SLF4J / Lombok), _logger. (ILogger), Log. (Android), debugPrint (Flutter) or os. (Swift). Otherwise it falls back to console., print, System. or Console..
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.toconsoleLogCleanup. confirmBeforeDelete falseto skip the confirmation.
More cleanup and setup tools
| Command | What it does |
|---|---|
| Run & Debug Configurations | Detects Next.js, Vite, NestJS, FastAPI, Django, Spring Boot, .NET, Flutter and more, and writes ., tasks. and extensions. |
| Remove Unused Imports | JavaScript, TypeScript, Python, Java and Kotlin |
| Unused Dependencies | Lists npm, Python and Flutter/Dart packages nothing uses, with the command to remove them |
| Dependencies & Installation | Declared, installed and newest versions for npm, yarn, pnpm, pip, Maven, Gradle, NuGet and pub |