Sol Web Solutions Blog

Sol Web Solutions Blog is aimed to help, inform, educate and enable our site visitors.

Use Debugging to fix code

Posted by Sol Web Solutions Blogger
Sol Web Solutions Blogger
Sol Web Solutions Blogger
User is currently offline
on Wednesday, 02 March 2011
in General Web 0 Comments

Debugging to fix codeA user reported a bug in an ASP.NET web application, and after running several test scenarios it was difficult to see where the bug actually resided.  Of course after much "hair pulling" and "keyboard banging", we turned to the debugger.

Initially, the breakpoint was just at the code block fired from a button click event.  Within the first test, we could see the bug was somewhere outside of this button click event.  Then, a second breakpoint was placed in the Page_Load event, and we caught the bug in a line which was a bit "over cautious" to help clean up the page.  Remembering the ViewState was placed on serveral controls in question, we were able to take the lines of code out of the page postback and the application was working correctly.

Being able to step through each line with the debugging tool gave great insight on what property values were being assigned to the controls, and allowed the code to be fixed fairly quickly.  The ASP.NET debugging tool provides great insight and with both step-into and step-over functionality, you can quickly go through your code and find where your changes need to occur.

Hits: 419
0 votes
Tags: ASP.NET
Trackback URL for this blog entry

Comments

No comments made yet. Be the first to submit a comment

Leave your comment

Guest Friday, 18 May 2012

Facebook Invite

Please log in through Facebook to invite your friends to this site!

Facebook LiveStream

Newest Customer

Buffalo Tours

Tour the community and peek at Los Alamos National Laboratory with a native Los Alamos guide. Our comfortable van tours are rich in history, archaeology, geology, and beauty. New Mexico is our home.
Buffalo Tours in Los Alamos :: Tour the community and peek at Los Alamos National Laboratory with a native Los Alamos guide

Constant Contact

Facebook Login

Login With Facebook

Like Sol Web

HostGator Hosting

Seussical The Musical

Los Alamos Little Theatre Seussical