পৃষ্ঠাসমূহ

Search Your Article

CS

 

Welcome to GoogleDG – your one-stop destination for free learning resources, guides, and digital tools.

At GoogleDG, we believe that knowledge should be accessible to everyone. Our mission is to provide readers with valuable ebooks, tutorials, and tech-related content that makes learning easier, faster, and more enjoyable.

What We Offer:

  • 📘 Free & Helpful Ebooks – covering education, technology, self-development, and more.

  • 💻 Step-by-Step Tutorials – practical guides on digital tools, apps, and software.

  • 🌐 Tech Updates & Tips – simplified information to keep you informed in the fast-changing digital world.

  • 🎯 Learning Support – resources designed to support students, professionals, and lifelong learners.

    Latest world News 

     

Our Vision

To create a digital knowledge hub where anyone, from beginners to advanced learners, can find trustworthy resources and grow their skills.

Why Choose Us?

✔ Simple explanations of complex topics
✔ 100% free access to resources
✔ Regularly updated content
✔ A community that values knowledge sharing

We are continuously working to expand our content library and provide readers with the most useful and relevant digital learning materials.

📩 If you’d like to connect, share feedback, or suggest topics, feel free to reach us through the Contact page.

Pageviews

Sunday, February 12, 2017

ASP.NET - Debugging

Debugging allows the developers to see how the code works in a step-by-step manner, how the values of the variables change, how the objects are created and destroyed, etc.
When the site is executed for the first time, Visual Studio displays a prompt asking whether it should be enabled for debugging:

Debugging Info When debugging is enabled, the following lines of codes are shown in the web.config:
<system.web>
   <compilation debug="true">
      <assemblies>
      ..............
      </assemblies>
   </compilation> 
</system.web>
The Debug toolbar provides all the tools available for debugging:
Debugging toolbar

Breakpoints

Breakpoints specifies the runtime to run a specific line of code and then stop execution so that the code could be examined and perform various debugging jobs such as, changing the value of the variables, step through the codes, moving in and out of functions and methods etc.
To set a breakpoint, right click on the code and choose insert break point. A red dot appears on the left margin and the line of code is highlighted as shown:
Breaking Highlighted Next when you execute the code, you can observe its behavior.
Breaking Highlighted2 At this stage, you can step through the code, observe the execution flow and examine the value of the variables, properties, objects, etc.
You can modify the properties of the breakpoint from the Properties menu obtained by right clicking the breakpoint glyph:
Breaking Dropdown The location dialog box shows the location of the file, line number and the character number of the selected code. The condition menu item allows you to enter a valid expression, which is evaluated when the program execution reaches the breakpoint:
Breaking Condition The Hit Count menu item displays a dialog box that shows the number of times the break point has been executed.
Breaking Point Clicking on any option presented by the drop down list opens an edit field where a target hit count is entered. This is particularly helpful in analyzing loop constructs in code.
Breaking Point2 The Filter menu item allows setting a filter for specifying machines, processes, or threads or any combination, for which the breakpoint will be effective.
Breaking Filters The When Hit menu item allows you to specify what to do when the break point is hit.
Breaking Point3

The Debug Windows

Visual Studio provides the following debug windows, each of which shows some program information. The following table lists the windows:
Window Description
Immediate Displays variables and expressions.
Autos Displays all variables in the current and previous statements.
Locals Displays all variables in the current context.
Watch Displays up to four different sets of variables.
Call Stack Displays all methods in the call stack.
Threads Displays and control threads.

No comments:

Post a Comment