Node.js & Backend JS debugging
Server-side JavaScript debugging — event-loop lag, stream backpressure, ESM/CommonJS interop, Express/Fastify middleware, and the runtime errors that only show up under load.
41 guides·32 playable labs
Playable labs
The Phantom Env VarWorks locally. Fails in CI after a config change.Config & Environment · EasyWrong Port, Right ServiceHealth check passes, traffic hits the admin service instead of the public API.Network & Connectivity · EasyThe Stale LockDeploy pipeline stuck because an old lock never expired.CI/CD & Pipelines · EasyAccessDenied at 3AMProduction job fails only after rotating credentials.Secrets & Auth · MediumThe Silent TimeoutRequests hang for 30 seconds, then succeed on retry.Network & Connectivity · MediumCache StampedeEvery morning at 9AM service slows to a crawl for 90 seconds.Caching & Performance · MediumThe N+1 That Wasn'tDB load explodes, but the query count looks normal.Database · MediumThe Missing HeaderAPI works in browser, fails in worker/client.HTTP/API · EasyThe Flaky RetryRetry logic makes the outage worse.Reliability · MediumThe Broken Health CheckDeployment rolls back even though app is alive.Deployment · EasyThe Timezone TrapReport fails only around midnight UTC.Date/Time · MediumThe Case-Sensitive ConfigWorks on macOS, fails in Linux CI.Config & Environment · EasyPagination off by onePage 1 skips the first N items.HTTP/API · EasyCORS origin parsing bugRegex origin validation allows malicious domains.Security · MediumCache key missing tenant idMulti-tenant cache key uses just user_id, causing cross-tenant leaks.Caching & Performance · HardThe stale confirmationA successful update is followed by an old value.Databases & Consistency · MediumThe missing trace IDA downstream request loses its correlation header.Observability · EasyHalf an importA rejected batch still leaves earlier rows committed.Data Integrity · HardThe log that ate the requestA debug log serializes an entire upload payload.Performance & Observability · MediumThe Price That Refused to UpdateMerchants change a price. Half the storefront still shows yesterday's number.Caching & Performance · EasyThe Invoice That Forgot QuantityCarts with quantity > 1 undercharge. Finance finds missing line totals.Data Integrity · MediumThe Retry That Amplified OutagesWhen auth fails, clients hammer it harder. Traffic multiplies the outage.Reliability · EasyThe Header That Vanished Mid-FlightAuthenticated upstream calls 401 even though the client set Authorization.Network & Connectivity · MediumThe Query That Loaded the WorldOrders list endpoint returns every tenant's rows and times out under load.Database · MediumThe Filter That Swallowed False?includeDeleted=false still returns soft-deleted rows.HTTP/API · MediumThe Rate Limit That Counted EveryoneOne noisy tenant trips the rate limit for every customer on the node.Reliability · MediumDuplicate webhook processingEach request registers another event listener, so later webhooks are processed multiple times.Events & Concurrency · MediumHTTP method casing mishandled for non-standard verbsA Request constructor accepts a method option. The library normalizes the six standard HTTP methods (DELETE, GET, HEAD, OPTIONS, POST, PUT) to uppercase regardless of input casing, while preserving every other method string exactly as supplied. Currently, the casing rule applies too broadly, altering method names that should pass through untouched.API & Request Flow · EasyRepeated trailing slashes in base URLWhen a base URL like 'https://api.github.com///' is joined with a path like '/users', the resulting URL contains an extra slash between the host and the path instead of a single separator.API & Request Flow · EasyZero-value entries-read argument omitted from XGROUP tokensA caller passes the ENTRIESREAD option set to 0 to XGROUP CREATE or XGROUP SETID. The argument builder should emit the ENTRIESREAD keyword and a '0' token. Instead, when the option value is exactly 0, the trailing ENTRIESREAD and '0' tokens are missing from the produced array.Data & Serialization · MediumApp.render rejects null and undefined options valuesA caller invokes `app.render(viewName, options, callback)` and expects the callback to deliver the rendered template string even when `options` is `null` or `undefined`. The callback does not deliver the expected rendered output for those cases, while rendering with a normal options object continues to succeed.Config & Environment · EasyIdempotency key ignoredThe payment endpoint validates an idempotency key but drops it before the database call.API & Request Flow · Medium
Debugging guides
API returns 404 after deploy: how to debug itAPI/backend debugging · BeginnerTimezone off by one day in JavaScript: how to debug itJavaScript/Node runtime debugging · IntermediateSlow API response: how to debug latency issuesAPI/backend debugging · IntermediateN+1 query slowing down your API: how to find and fix itAPI/backend debugging · IntermediateWorker process memory leak: how to find and fix memory leaks in background jobsJavaScript/Node runtime debugging · AdvancedRequest body undefined in Express: how to debug missing request bodiesJavaScript/Node runtime debugging · BeginnerESM CommonJS import error: how to debug module system conflictsJavaScript/Node runtime debugging · IntermediateAPI timeout: how to debug request timeout issuesAPI/backend debugging · IntermediateStale lock bug: how locks that are never refreshed cause outagesJavaScript/Node runtime debugging · AdvancedHidden state bug in React form: how to debug stale closures and state issuesJavaScript/Node runtime debugging · IntermediateDebugging UnhandledPromiseRejection in Node.js ApplicationsJavaScript · IntermediateDiagnosing Node.js Event Loop Lag and High Latency in ProductionNode.js · AdvancedExpress Middleware Not Executing in Order: A Debugging GuideNode.js · BeginnerNode.js ESM/CommonJS Interop: require() of ES Module FailsNode.js · IntermediateDebugging Node.js Stream Backpressure: When HighWaterMark Betrays YouNode.js · AdvancedFastify Plugin Not Registered: Debugging the 'Missing Plugin' ErrorNode.js · IntermediateNode.js Graceful Shutdown Not Completing: Debugging Dirty Handles and Stuck TimersNode.js · IntermediateExpress-Session Not Saving Between Requests: The Real CausesNode.js · IntermediateNode.js Module Resolution: Why 'Cannot Find Module' Keeps HappeningNode.js · IntermediateExpress req.body Undefined: Body-Parser Not WorkingNode.js · BeginnerDebug Node.js child_process.spawn() FailuresNode.js · IntermediateNode.js Worker Threads Messages Not Received: Debugging Communication FailuresNode.js · AdvancedNode.js Crypto Module Error: Common Failures and FixesNode.js · IntermediateNode.js Buffer Encoding Decoding Errors: A Production Debugging GuideNode.js · IntermediateMulter File Upload Not Working in Express: A Debugging GuideNode.js · IntermediateNode.js Inspector Debugger: Diagnosing Protocol Disconnections and Async BreakpointsNode.js · IntermediateDebugging Node.js Cluster Module Worker CrashesNode.js · AdvancedJavaScript Closure Stale Variable Inside LoopJavaScript · IntermediateDebugging Prototype Chain Inheritance Bugs in JavaScriptJavaScript · AdvancedJavaScript Microtask & Promise Execution Order DebuggingJavaScript · AdvancedJavaScript Generator Iterator Not Working: Debugging Silent FailuresJavaScript · AdvancedDebugging for-await-of Errors with Async IteratorsJavaScript · AdvancedDebugging Unexpected State Changes from JavaScript Object MutationJavaScript · IntermediateDebugging JavaScript Proxy Reflect Traps: When Your Proxy Silently FailsJavaScript · AdvancedDebugging 'this' Being Undefined in JavaScriptJavaScript · IntermediateJavaScript Regex Catastrophic Backtracking Debug GuideJavaScript · AdvancedDebugging JavaScript NaN Comparison: Why NaN === NaN is FalseJavaScript · BeginnerWhy Optional Chaining Returns Unexpected UndefinedJavaScript · BeginnerBun Runtime Compatibility Error: A Debugging GuideNode.js · IntermediateDeno Permission Denied Error: A Practical Debugging GuideNode.js · IntermediateElectron IPC Breakdown: When main and renderer stop talkingJavaScript · Advanced