Arushi-maker / students

MIT License
0 stars 0 forks source link

Debugging Event #7

Open Arushi-maker opened 8 months ago

Arushi-maker commented 8 months ago

To start with, I ran my frontend without running the backend, and then I received an error. Through debugging I realized I need to run backend.

  1. Start backend using Debugging

    Screenshot 2024-03-10 at 2 14 22 PM
  2. Set break point at the beginning of endpoint <img width="1221" alt="Screenshot 2024-03-10 at 2 16 06 PM" src="https://github.com/Arushi-maker/students/assets/75818107/6125d47f-be31-

  3. Start in frontend with split screen loading source for an API fetch using GET.

    Screenshot 2024-03-10 at 2 20 16 PM

    45a7-a274-d9e2cd8a5ebb"> code

  4. Set break point on fetch, inside .then, inside .fetch

    Screenshot 2024-03-10 at 2 21 26 PM
  5. Run frontend, screen capture break at fetch while examining Body

    Screenshot 2024-03-10 at 2 22 45 PM
  6. Press play on frontend, observe stop inside of backend

Screenshot 2024-03-10 at 2 34 52 PM
  1. Press step over on backend until you have obtained data from database, screen capture Python Object

    Screenshot 2024-03-10 at 2 36 03 PM
  2. Press play button to end backend debugging session.

    Screenshot 2024-03-10 at 2 16 06 PM
  3. Return to frontend debug session

    Screenshot 2024-03-10 at 2 39 35 PM
  4. Step in until you see data, screen capture capturing break point and Data.

    Screenshot 2024-03-10 at 2 40 42 PM Screenshot 2024-03-10 at 2 43 45 PM Screenshot 2024-03-10 at 2 45 04 PM

Peer grade: (1.86/2) I follow the canvas steps and change the code in the front end a bit to see how the error changes and reacts to my changes. I practice the debugging skills by going through console in frontend and then debugging in the backend as well. I encounter the error and realize that my backend server wasn't turned on. To fix it, I type "python main.py" and it allows for me to have my backend running. Once the backend runs, the logs work and the posts can be fetched/can be seen.