Every developer checks for potential errors before launching the web application they have painstakingly developed. Two functionality, debugging and tracing, help track the error and remove all traces of the bug. In ASP.Net Ajax applications, debugging becomes a challenge as there is a good mix of client side and server side code, wherein the client side code contains scripts, styles and HTML markups.
As a developer, you will need to overcome these challenges, and offer to debug the code and remove the potential errors. Here's how you can perform both debugging and tracing for Ajax ASP.Net applications.
Methods to Enable Debugging
Let's begin by understanding the gist of debugging. It is the process of setting breakpoints along the code so that you can track the potential errors. One of the potential methods is including debug class in the Sys namespace. Of course, there are other methods too, some of which are listed below
The methods you can adopt include one of the above mentioned three. Of course, you can also use the server side tracing method to conduct the debugging of errors. You can even trap the HTTP traffic by using external tools for this purpose.
Let's enable debugging support for your AJAX based ASP.Net application. Here's the code that you need to use
<configuration> <system.web> <compilation debug = "true"> </compilation> </system.web> <configuration>
Let's say you want to disable the debugging support, then here's the code for you
<configuration> <system.web> <compilation debug = "false"> </compilation> </system.web> <configuration>
Before you release the application, try to set the release version for the same. Set the ScriptMode property of the application to release the Scriptmanager controls before you deploy the app. You should also set IsDebuggingEnabled attribute in the application to true before you can begin with debugging.
<asp:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Debug"> :
How to enable debugging in the IE web browser that you are currently using? Try incorporating the below mentioned five steps to process debugging
If you are using the Sys. Debug class, then here are the methods that will enable tracing and debugging
Methods to Enable Tracing
With tracing, you can display the execution path and helps display the diagnostic information when you execute the application. You can list out the methods in the Sys.Debug class to help debug the application, trace the output and display the trace messages.
The following code is one of the many methods using which you can trace the output
If you can output the text message to the TextArea control you can use the following code
Use the ClearTrace method to clear the trace console.
<configuration <system.web> <compilation debug = "true"> //usual configuration code </compilation> </system.web> <configuration>
Both debugging and tracing are internal functions built into the ASP.Net Ajax using which you can easily debug and trace the potential errors. This will help improve the pace of improvising the whole application, and deploy it faster. Hire ASP.Net developers to give out an application suited to your business needs.
|By Deepa Ranganathan On 28 Aug, 15 Viewed: 593|
In asp.net there is not control to select multiple files and upload them once with progress bar, so we will use a small third party DLL to achieve this functionality. We will use Flajaxian FileUploader, you can download it from [http://www.flajaxian.com] We will create three different images... By Hamden On 12 Jul 2012 Viewed: 5,886
I was searching for select/deselect all checkboxes code into a gridview. I found most of them only provide to select and deselet all the checkboxes if any of the checkbox is unselected into grid the main checkbox is not affecting. I further try to search some useful code but could not found any... By Ali Adravi On 10 Jul 2012 Viewed: 4,500
There are many cases where we need to validate the value in controls before submitting to the database, so let's discuss email validation like format, length and existence into database. We will walk through in this article, how to validate entered user email from database, whether email is already... By Ali Adravi On 05 Jan 2013 Viewed: 6,173
Microsoft .NET Framework 3.5 SP1 introduced a routing engine to the ASP.NET runtime. The routing engine can decouple the URL in an incoming HTTP request from the physical Web Form that responds to the request, allowing you to build friendly URLs for your Web applications. Let's start make our... By Ali Adravi On 05 Jan 2013 Viewed: 2,183
It’s good practice to log all the error into a file or database so in future you can check, how your application is working, and is there any issue which is not caught by Q.A. team. Really it's helpful to understand and caught the issues after deploying the application on production... By Myghty On 30 Dec 2012 Viewed: 1,197