본문으로 건너뛰기
cccskills
무료GitHub에 공개

debugger

Use rust-gdb to inspect variables and step through code without modifying it. Prefer it over print debugging for any investigation into what the compiler is actually doing (lldb is unavailable on Claude Code Web).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

wado-lang/wado스타 119(GitHub 119 + cccskills 0)

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md3.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Debugger

Debug wado compiler with rust-gdb.

Build first

dev sets debug = "line-tables-only" and raises the workspace crates to opt-level = 1, so info locals / info args come back empty in every compiler frame. Build the debugger profile instead — full DWARF, no optimization on the crates being stepped through, its own target/debugger/ dir so the dev cache stays warm:

cargo build --profile debugger --bin wado

Usage

cat > scratchpad/gdb_commands.txt << 'EOF'
file ./target/debugger/wado
set pagination off
break emit_function
run compile -o scratchpad/out.wasm example/hello.wado
info locals
print func.name
bt 5
quit
EOF
rust-gdb --batch -x scratchpad/gdb_commands.txt

Break on a function name, not a file:line: a line number drifts with the next edit above it. gdb matches a bare name in every module, so qualify one that more than one module defines.

Ask one question per run, not one per build

A breakpoint that fires thousands of times and gets greped answers one question and costs a rebuild for the next. Make the breakpoint itself select:

break wado_compiler::wir_build::calls::local_get if $_streq(name->data_ptr, "…")
break substitute_types_in_expr
commands
silent
bt 6
continue
end

bt at a conditional hit gives the origin outright — the thing print debugging cannot produce without guessing where to put the next eprintln!.

Printing Rust values

printf "%s", s fails on a Rust String (it is a struct, not a char*) and aborts the whole command file with Value can't be converted to integer. Use print, which rust-gdb's pretty printers handle:

print fq              # "core:prelude/string.wado/String^Eq::eq"
print *expr
print info.struct_name

$_streq(s->data_ptr, "lit") is the way to compare one inside a breakpoint condition.

Batch runs

rust-gdb --batch exits on the first command error, so a typo in a commands block silently truncates the rest of the run — check the tail of the output for Error in sourced command file before trusting an empty result. Redirect to a file and grep it; the DWO-loading noise otherwise buries the hits:

rust-gdb --batch -x scratchpad/gdb_commands.txt > scratchpad/gdb.log 2>&1
grep -a '^\$[0-9]* = ' scratchpad/gdb.log | sort -u

When a guard beats a breakpoint

The debugger answers "what is this value here". When the question is "where else does this invariant break", an assertion at the point the invariant must hold enumerates every violation in one run and keeps doing so afterwards — the same reason a newtype that makes an illegal name unconstructible beats chasing one miscompile at a time. Reach for debug_assert! / assert! in the merge or registration step first, and for gdb once it fires and you need the values behind it.

Common commands

CommandDescription
info localsShow local variables
info argsShow function arguments
print *exprDereference and print pointer
bt 5Backtrace (top 5 frames)
continueResume execution

Notes

lldb does not work in Claude Code Web due to ptrace restrictions:

error: Cannot launch '...': personality get failed: Invalid argument

Use rust-gdb instead.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

benchmark

무료

Measure Wado's performance or the size of the Wasm it generates, and refresh the benchmark/ and wasm-size/ README files. Use for any benchmarking or size-measurement request, whichever benchmark it names.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

wado-lang/wado1192026년 10월 26일 업데이트

ci-timing

무료

Measure how long GitHub Actions jobs and steps took across past runs, and find the pull request that made CI slower. Use for any question about CI duration, a slow job, or when CI got slow.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

wado-lang/wado1192026년 10월 26일 업데이트

How to answer code review feedback — a human reviewer, CodeRabbit, or any review bot. Verify the findings, report the classes they are instances of to the user before fixing, then fix the class rather than the sites named. Put design decisions to the user, then run /distill. Invoke when responding to review comments on a pull request, or to the findings of a /code-review run.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

wado-lang/wado1192026년 10월 26일 업데이트

Investigate and improve code coverage for the wado-compiler crate. Use for any question about what the tests do and do not reach, dead code included.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

wado-lang/wado1192026년 10월 26일 업데이트

cr

무료

Review the branch with /code-review at high, then answer the findings with /code-review-response.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

wado-lang/wado1192026년 10월 26일 업데이트

distill

무료

Cut the branch down to what the code cannot say: reuse what exists, remove duplication, dead code, and wasted work, turn invariants into asserts, and delete the comments the code already speaks. Run it after answering review feedback too — a fix written to satisfy a reviewer is the least distilled code on the branch.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

wado-lang/wado1192026년 10월 26일 업데이트

wado-lang의 스킬 모두 보기

이 스킬의 문제 신고