If breakpoints turn hollow → VS cannot attach because JIT optimized code away. ✔ Fix Project → Properties → Build → Uncheck “Optimize code”Then: Clean → Rebuild → Restart VS 💡 Hidden Tip Also ensure: Debug → Options → Enable Just My Code
Day: December 9, 2025
WP “Permalinks Not Working” — The .htaccess Rewrite Reset
Sometimes WP permalinks break silently. ✔ Fix Go to:Settings → Permalinks → Save (without changing) This regenerates .htaccess with: # BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress Instant fix.
Windows 11 “VPN Slow After Update” — Broken MTU
Windows updates sometimes reset MTU to a suboptimal value. ✔ Detect: ping google.com -f -l 1472 Reduce until no fragmentation. ✔ Apply Fix: netsh interface ipv4 set subinterface “Ethernet” mtu=1400 store=persistent
Windows 11 “Alt-Tab Lag” — The Explorer Restart Trick
Alt-Tab becomes slow due to animation caching. ✔ Fix: taskkill /IM explorer.exe /F start explorer.exe Refreshes UI animation buffers.
AJAX “POST Suddenly Fails” — The Missing Content-Type Header
Many backends reject requests silently. ✔ Fix: $.ajax({ method: “POST”, url: “/api/data”, contentType: “application/json”, data: JSON.stringify({ id: 1 }) }); Missing contentType = backend can’t parse payload.
JS “Undefined Errors in Loops” — The Closure Trap
Typical bug: for (var i = 0; i < 5; i++) { setTimeout(() => console.log(i), 100); } Output: 5 5 5 5 5 Because var is function-scoped. ✔ Fix for (let i = 0; i < 5; i++) { setTimeout(() => console.log(i), 100); } Or: setTimeout(((x)=>()=>console.log(x))(i), 100);
HTML5 Input “step=any” — The Secret to Fix Broken Decimal Validation
Developers struggle with inputs like: <input type=”number” step=”0.01″ /> But values like 0.333 fail. ✔ Fix Allow any decimal: <input type=”number” step=”any” /> 💡 Works beautifully for: currency measurements percentages
CSS “Absolute Element Misaligned” — The position: relative Curse
Absolute positioned child needs a positioned parent. ❌ Wrong .parent { } .child { position: absolute; top: 10px; } ✔ Correct .parent { position: relative; } .child { position: absolute; top: 10px; } 💡 Hidden Trap Transforms also create new positioning contexts.
.NET Core “Kestrel Timeout” — The Hidden Request Body Limit
Many APIs fail mysteriously with: “Unexpected end of request content.” Because the request body timeout is too low. ✔ Fix builder.WebHost.ConfigureKestrel(o => { o.Limits.RequestBodyTimeout = TimeSpan.FromMinutes(5); }); 💡 Life-Saver For: file uploads slower mobile clients integrations with old systems
ASP.NET Core “IOptions Snapshot Turns Slow” — The Startup Misuse
Calling IOptionsSnapshot in tight loops = performance disasterbecause it reconstructs objects every request. ✔ Fix Use IOptionsMonitor for high-frequency reads. public MyService(IOptionsMonitor<MyConfig> cfg) { _cfg = cfg; } Monitor is cached, Snapshot is per-request.
SQL “Blocking Chains” — The Magic of READPAST
Ever seen queries freeze because a row is locked? Use the magical, rarely-used hint: SELECT * FROM Orders WITH (READPAST) WHERE Status = ‘Pending’; This skips locked rows instead of waiting. ✔ Perfect for: Queue tables Background workers Batch processors
SQL “High CPU for No Reason” — The Missing Statistics Update
Sometimes SQL goes to 80–90% CPU “out of nowhere”because stats are stale. ✔ Emergency Fix: UPDATE STATISTICS Orders WITH FULLSCAN; 💡 Why It Works The optimizer chooses WILDLY wrong plans if statistics aren’t fresh. ⚠ Pro Tip If your DB is huge → don’t FULLSCAN often.Use: EXEC sp_updatestats; Much lighter.
C# “JsonSerializer Ignores Private Setters” — The Missing Attribute
System.Text.Json does not serialize properties with private setters unless marked. ✔ Fix: [JsonInclude] public string Name { get; private set; } 💡 Hidden Trick This works even when constructor injection is used — extremely useful for DDD entities.
C# “Background Task Randomly Stops” — Lost Exceptions in Fire-and-Forget
The classic mistake: Task.Run(() => DoWork()); Exceptions inside fire-and-forget tasks are lost forever → task silently dies. ✔ Correct Pattern _ = Task.Run(async () => { try { await DoWork(); } catch (Exception ex) { logger.LogError(ex, “Background task failed”); } }); 💡 Why This Saves Lives Silent exceptions = random missing jobs.
C# “StringBuilder Turns Slow” — The Hidden Capacity Trap
Everyone uses StringBuilder for speed…but almost nobody knows WHY it becomes slow after heavy use. ⚠ Problem When StringBuilder grows beyond its internal buffer → it doubles memory and copies everything.Large loops = huge perf waste. ✔ Life-Saving Fix var sb = new StringBuilder(50000); // pre-allocate If you know approximate size → pre-allocating saves massive […]








