WEBVTT

1
00:00:01.820 --> 00:00:07.040
Now, what Cursor also can do for you is help you debug errors.

2
00:00:07.840 --> 00:00:12.760
Now, VS Code can also do that and you can always ask in a chat, I guess, but here, for

3
00:00:12.760 --> 00:00:18.700
example, I can try to run my program and if I do that and I enter some text, I'll get

4
00:00:18.700 --> 00:00:19.080
an error.

5
00:00:20.180 --> 00:00:24.800
I'll get an error here and what I can do now is I can add it to chat, but we'll explore

6
00:00:24.800 --> 00:00:25.300
that later.

7
00:00:25.480 --> 00:00:28.260
I can add it to Composer, but we'll explore that later too.

8
00:00:29.480 --> 00:00:33.960
So right now, I'll do the suggested thing and debug this with AI.

9
00:00:34.960 --> 00:00:41.720
And this also opens a chat for me, but it pastes the terminal output as context into

10
00:00:41.720 --> 00:00:47.640
the chat, generates a prompt for me and Cursor then tries to help me fix this.

11
00:00:49.940 --> 00:00:57.260
And it gives me a code snippet here with some suggestions regarding what I should do here.

12
00:00:59.320 --> 00:01:04.660
In this case here, I should rename input to user input because input is kind of a reserved

13
00:01:04.660 --> 00:01:04.980
name.

14
00:01:05.080 --> 00:01:07.200
It's this input function that's built into Python.

15
00:01:07.900 --> 00:01:15.300
So I can click apply here so that I see these changes being applied here in the code editor.

16
00:01:15.580 --> 00:01:18.200
Red is the code that's removed, green is the code that's added.

17
00:01:18.640 --> 00:01:25.960
I can accept that, close the chat, close the terminal so that this is my new code.

18
00:01:27.160 --> 00:01:36.660
Save this and try running this again, like this.

19
00:01:38.020 --> 00:01:43.920
And with that, this output text file was added and this code was added here as well, as you

20
00:01:43.920 --> 00:01:44.220
can tell.

21
00:01:46.120 --> 00:01:51.380
Now there are more maxes in there because I tried this off screen, but that's how Cursor

22
00:01:51.380 --> 00:01:53.020
works and what you can also do with Cursor.

23
00:01:53.360 --> 00:01:55.220
It can help you debug errors.

