9148c358d0
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를 Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류. - 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로 자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거, 동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거. - 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming, Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business, Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로, 나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는 title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백). 원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지. - 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서. - 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는 지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지. - Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경. - 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
4.5 KiB
4.5 KiB
id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
| id | title | category | status | canonical_id | aliases | duplicate_of | source_trust_level | confidence_score | verification_status | tags | raw_sources | last_reinforced | github_commit | tech_stack | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| wiki-2026-0508-debugger-techniques | Debugger Techniques | 10_Wiki/Topics | verified | self |
|
none | A | 0.9 | applied |
|
2026-05-10 | applied |
|
Debugger Techniques
매 한 줄
"매 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 의 모든 변경 이력.
- WinDbg TTD (Windows).
- Chrome DevTools "Replay panel" (2025+ experimental).
매 응용
- Heisenbug — 매 conditional + log-point.
- Crash post-mortem — 매 core dump + gdb.
- Performance — 매 sampling + breakpoint.
- Memory leak — 매 heap snapshot diff.
- Distributed — 매 OpenTelemetry trace.
💻 패턴
Chrome conditional breakpoint
// 매 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.gdb
set 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
import pdb; pdb.set_trace() # 매 classic
breakpoint() # 매 PEP 553 (python 3.7+)
# 매 VS Code remote: debugpy.listen(('0.0.0.0', 5678)); debugpy.wait_for_client()
eBPF dynamic tracing
sudo bpftrace -e 'uprobe:./app:malloc { @[ustack] = count(); }'
Conditional log-point pattern
// 매 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 });
매 결정 기준
| 상황 | Tool |
|---|---|
| Web (Chromium) | DevTools Sources panel |
| Node.js | --inspect + DevTools / VS Code |
| C/C++ Linux | gdb / lldb + rr |
| C/C++ macOS | lldb + Instruments |
| Python | debugpy + VS Code |
| Heisenbug | rr + Pernosco |
| Production crash | core dump + gdb |
| Distributed | OTel trace |
기본값: 매 IDE breakpoint → 부족시 rr / TTD.
🔗 Graph
- 부모: 중단점 (Breakpoints)
- 변형: 동적 런타임 분석 (Dynamic Runtime Analysis)
- 응용: Flame_Graphs · Logging_and_Error_Handling
- Adjacent: Analyze runtime performance
🤖 LLM 활용
언제: stack trace 해석, log clustering, hypothesis generation, repro script. 언제 X: 매 step-into 같은 deterministic 작업 — IDE 가 직접.
❌ 안티패턴
- printf-only: 매 build cycle 낭비 — debugger 사용.
- Production breakpoint: 매 thread freeze — log-point 사용.
- No source map: 매 minified frame 해독 불가.
- Trust gut without repro: 매 unreliable repro 면 가설 무한 반복.
🧪 검증 / 중복
- Verified: Chrome DevTools docs; gdb manual; rr-project.org; Pernosco docs.
- 신뢰도 A.
🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — breakpoint taxonomy + rr/TTD + multi-lang |