Now, what Cursor also can do for you is help you debug errors.
Now, VS Code can also do that and you can always ask in a chat, I guess, but here, for
example, I can try to run my program and if I do that and I enter some text, I'll get
an error.
I'll get an error here and what I can do now is I can add it to chat, but we'll explore
that later.
I can add it to Composer, but we'll explore that later too.
So right now, I'll do the suggested thing and debug this with AI.
And this also opens a chat for me, but it pastes the terminal output as context into
the chat, generates a prompt for me and Cursor then tries to help me fix this.
And it gives me a code snippet here with some suggestions regarding what I should do here.
In this case here, I should rename input to user input because input is kind of a reserved
name.
It's this input function that's built into Python.
So I can click apply here so that I see these changes being applied here in the code editor.
Red is the code that's removed, green is the code that's added.
I can accept that, close the chat, close the terminal so that this is my new code.
Save this and try running this again, like this.
And with that, this output text file was added and this code was added here as well, as you
can tell.
Now there are more maxes in there because I tried this off screen, but that's how Cursor
works and what you can also do with Cursor.
It can help you debug errors.