source-maps-debugging
Installation
SKILL.md
Use Source Maps to Debug TypeScript
Overview
Source maps bridge the gap between your TypeScript source code and the compiled JavaScript that actually runs. They allow debuggers to show your original TypeScript code, set breakpoints in .ts files, and provide meaningful stack traces. Without source maps, you're debugging compiled JavaScript, which is frustrating and error-prone.
Proper source map configuration is essential for productive debugging of TypeScript applications.
When to Use This Skill
- Debugging TypeScript in browsers or Node.js
- Setting up build tools (webpack, vite, rollup)
- Stack traces show compiled JavaScript
- Breakpoints not working in TypeScript files
- Configuring production builds
The Iron Rule
Enable source maps in development for debugging. Consider separate source maps in production for error reporting while keeping bundle sizes small.