Debugging Example of 2.4a Database with CRUD
Showing step by step an example of my debugging of the CRUD operations in my database.
Making my own Database with CRUD
My database is a shopping list. Users can create, read, update, and delete items from their list, making it convenient to shop and to stay organized.
link to my 4.a notebook (my database is at the bottom)
-
My createitem() function (as a part of the menu) -
-
Step into the function while debugging - first step in function is to type in the item you want to create, in this example, I am creating the item “Mango”
-
The debugger shows every step that the function goes through. - This function creates the object and then defines its attributes. The attributes are displayed on the left, which in this case are “Mango”, “2”, and “Sprouts”
-
The menu then displays the created item
-
Finally, the newly created item appears in the database.
- The other CRUD functions incorporated work in a similar way. When I use the debugger, I can see every step that the function goes through, as well as its result. I think it is so interesting to see how every function is called within the menu and the program then goes to the function and performs it line by line.