Debugging
Now that we’ve got Claude Code up and working, we can turn back to where we left Yesterday’s Weather at the end of the previous lesson. Although Cursor had written the code required to satisfy the spec, on loading the weather is wrong—it comes back with null results.
We can use the same approach to debugging with Claude Code that we used before with Cursor. We’ll explain the problem and then see what it suggests.
In the particular instance there is a problem with the Open Meteo API.
One of the tools we’ll be able to use will be to send Claude Code off to read the API docs, and attempt to fix the issue.
Slash Commands
When using Claude Code, there are some special commands you can access which
start with a slash. Probably the most important is /cost, which will give
you a summary of how much you’ve spent in the current session, with a breakdown
of what models you’ve been using and the number of tokens for each of them.