DEV Community

KateYoung
KateYoung

Posted on • Updated on

Mar,18,2021

Today is the day I begin to learn ASP.NET, as someone who just started her professional career. I would like to document my debug journey.

IDE
Visual Studio 2015

Scenario
I tried to create a webform and get stuck at one bug for 2hours.
and how I troubleshoot.

Investigation

  1. I make sure that each element has assigned a unique ID so that each textbox is related exactly to each label.
  2. I make sure that each button has assigned a unique ID so that it associates with its function block.
  3. I eliminated unlikely causes and narrow them down to sensible cause: unlikely it's caused by HTML tags, and since it should return values when you clicked the button, so it could be an interactive behavioral bug.

Hypothesis
Onclick was not appear on aspx page.

Test
button.Onclick doesn't response as it should be.

Conclusion
Go back to the source code page, check for buttons and add "OnClick" at the end of the line, assigned it to the associated button ID. since there are two buttons.

Takeaway
when dealing with errors, try to form a road map in your head, first, ask what exactly doesn't work? try to focus on one little piece at a time, with the enormous information on the internet, you can easily lose focus and waste your time.

Be sensible to think through the code lines, is it a behavioral bug? is it something else?

Be patient, patient, patie, pati, pat, pa, p.ʕ•́ᴥ•̀ʔっ

Top comments (0)