Day 02 Core Concepts

The Chat Interface: Asking Questions About Your Codebase

Cursor Chat (Cmd+L) is where you have conversations with your code. Ask questions about how things work, request explanations, and get help debugging — all with your codebase as context.

~1 hour Hands-on Precision AI Academy

Today’s Objective

Cursor Chat (Cmd+L) is where you have conversations with your code. Ask questions about how things work, request explanations, and get help debugging — all with your codebase as context.

A productive debugging session using Cursor Chat: you'll diagnose a real bug, understand an unfamiliar function, and get a refactoring suggestion — all through chat without leaving the editor.

How Cursor Chat Works

Open Chat with Cmd+L (Ctrl+L on Windows). A panel opens on the right. The difference from talking to ChatGPT in a browser: Cursor automatically includes context from your open files, selected code, and your project structure.

You can control what context is included using @mentions:

@mention Types
TEXT
@filename.py → includes a specific file in context
@Folders → includes an entire folder
@Codebase → searches across your whole project
@Docs → include a library's documentation
@Web → search the web and include results
@git → include recent git changes

The @Codebase mention is particularly powerful — Cursor does a semantic search across your project to find relevant code, then includes it in the context window before answering your question.

Effective Questions for Code Understanding

Cursor Chat is most valuable for understanding code you didn't write — inherited codebases, open source libraries you're integrating, or your own code from 6 months ago.

High-value question patterns:

Good Chat Questions
TEXT
# Understanding
"Explain what this function does and why it was written this way"
"What are all the places where user_id is used?"
"Walk me through what happens when a user logs in"

# Debugging
"I'm getting this error: [paste error]. What's wrong?"
"Why would this return None sometimes?"
"What edge cases am I not handling?"

# Planning
"I want to add rate limiting to the API. Where should I add it?"
"What would break if I changed this function signature?"

Debug a Real Bug with Chat

The best way to learn Cursor Chat is with a real debugging session. Find a bug in something you're working on, or create one intentionally for practice.

Debugging workflow with Cursor Chat:

Select the code that's misbehaving. Right-click → "Add to Chat" or press Cmd+L with selection active. This adds the code directly into the chat context.

Paste the error message if there is one: "I'm getting this error when calling this function: [error]. What's wrong?"

If Chat suggests a fix, it'll often include a code block you can apply directly using the Apply button — no copy-paste needed.

Use @git to debug recent regressions. If something broke after a recent commit: "@git What changed recently? Could any of those changes cause [problem]?" Cursor reads your recent diffs and reasons about them.

40%

Supporting Resources

Go deeper with these references.

Cursor
Cursor Documentation Official Cursor IDE documentation covering features, keybindings, and configuration.
YouTube
Cursor AI Tutorials Community video tutorials demonstrating Cursor workflows in real projects.
GitHub
Awesome Cursor Rules Community-shared .cursorrules files for popular frameworks and languages.

Day 2 Checkpoint

Before moving on, make sure you can answer these without looking:

Continue To Day 3
Composer: Build Entire Features Across Files