"매 print 보다 breakpoint 가 빠르고, breakpoint 보다 reverse-debug 이 깊다.". Debugger techniques 는 breakpoint, watchpoint, conditional, log-point, time-travel, post-mortem (core dump) 의 매 toolkit. 2026 stack: Chrome DevTools (live), VS Code DAP, gdb/lldb, rr (record-replay), Pernosco (cloud time-travel).
매 핵심
매 Breakpoint Type
Line: 매 source line 정지.
Conditional: 매 expression true 일 때만.
Log-point ("tracepoint"): 매 정지 안하고 log 찍음.
Function: 매 fn enter.
Watchpoint: 매 memory address change.
Exception: 매 throw caught/uncaught.
DOM: 매 Chrome — node modification.
XHR/fetch: 매 URL pattern.
Event listener: 매 click/keydown 등.
매 Time-Travel Debugging
rr (Linux): record once, replay backwards/forwards — 매 nondeterministic bug 의 답.
Pernosco: rr trace 의 cloud UI — 매 expression 의 모든 변경 이력.
// 매 in DevTools right-click line → Add conditional breakpoint
// expression: user.id === 42 && cart.total > 1000
// 또는 logpoint: console.log('cart', cart, 'time', performance.now())
gdb scripted debugging
gdb --batch -x debug.gdb ./app core.12345
# debug.gdbset pagination off
bt full
info threads
thread apply all bt
print *some_struct
lldb Python script
(lldb) script
>>> frame= lldb.frame
>>> for var in frame.variables: print(var.name, var.value)
rr record-replay (Linux)
rr record ./buggy_program
rr replay
# 매 in rr's gdb(rr) reverse-continue
(rr) reverse-step
(rr) watch -l some_var
Node.js inspector + Chrome
node --inspect-brk=0.0.0.0:9229 server.js
# 매 chrome://inspect
Python pdb / debugpy
importpdb;pdb.set_trace()# 매 classicbreakpoint()# 매 PEP 553 (python 3.7+)# 매 VS Code remote: debugpy.listen(('0.0.0.0', 5678)); debugpy.wait_for_client()
// 매 production-safe lazy log — no perf cost when disabled
if(DEBUG)console.log('state',JSON.stringify(state));// 매 better — feature flag gated
if(flags.debugCart)logger.debug({cart,user});