Are you in need of debugging the java script code and since VS dont support this by default, this could be done by using multiple alerts at the place where we need to know the obj values... But this is tricky to handle...
So Go for debugger; option which enables your browser to ask for debugging Javascript coding And this debugging could be done with editors of VS (From VS 2003).
example -
function(value)
{
debugger;
var test;
if(value==1)
return true;
else
return false;
}
Note: For this ur browser has to be enabled for script debugging.
Goto Tools-> Options -> Internet Options[Advanced Tab].Ensure Disable script debugging options are unselected.
Monday, December 29, 2008
Debug Java Script
Tracing in ASP.NET
ASP.NET tracing enables you to view diagnostic information about a single request for an ASP.NET page. ASP.NET tracing enables you to follow a page's execution path, display diagnostic information at run time, and debug your application. ASP.NET tracing can be integrated with system-level tracing to provide multiple levels of tracing output in distributed and multi-tier applications.
ASP.NET tracing offers the following features:
Debugging statments You can write debug statements in your code without having to remove them from your application when it is deployed to production servers. You can also write variables or structures in a page and trace through the execution path of your page or application.
Integrated tracing functionality You can route messages emitted by the System.Diagnostics..::.Trace class to ASP.NET tracing output, and route messages emitted by ASP.NET tracing to System.Diagnostics..::.Trace. You can also forward ASP.NET instrumentation events to System.Diagnostics..::.Trace. For more information, see Walkthrough: Integrating ASP.NET Tracing with System.Diagnostics Tracing.
Programmatic access to trace messages You can access and manipulate trace messages from your code for finer control over the format of trace messages or for additional processing that you require.
Application-level tracing The application-level tracing option lets you view the most recent tracing data available without restarting a tracing session and without increasing the amount of tracing data that the server must store. The most recent tracing data is displayed, and older tracing data is discarded.
log into the below link for more information:
http://msdn.microsoft.com/en-us/library/bb386420.aspx
Saturday, March 15, 2008
Debug a T-SQL Stored Procedure
1) In a new SQL Server project, establish a connection to the AdventureWorks sample database.
2) Create a new stored procedure using the code from the first example section below, and name it HelloWorld.
CREATE PROCEDURE HelloWorld
AS
DECLARE @mynvarchar NVARCHAR(50),
@myfloat FLOAT
SET @mynvarchar = @@VERSION
SET @mynvarchar = 'Hello, world!'
SET @myfloat = 1.6180
PRINT @mynvarchar
RETURN (0)
3) Set breakpoints in HelloWorld, and step into the stored procedure. The instruction pointer, designated by a yellow arrow, will appear on the line SET @mynvarchar = @@VERSION, the first executable line of code in the stored procedure.
4) Try out different debugging features.
4.1) Make the Locals window visible. To do so, on the Debug menu, click Windows, and then click Locals. Notice that the parameters and local variables are displayed in the Locals window with their corresponding values. You can edit the values of the variables in the Locals window as the stored procedure runs.
4.2) Press F10 to step one line in the stored procedure. Notice that the value of the variable @mynvarchar has changed in the Locals window and its value is now displayed in red, indicating it has changed.
4.3) Make the Watch window visible. To do so, on the Debug menu, click Windows, and then choose Watch.
4.4) In the Text Editor, double-click the @mynvarchar variable to select it. Drag @mynvarchar to any location on the Watch window. The variable is now added to the list of watched variables.
4.5) In the Text Editor, right-click the line Return (0), and on the shortcut menu, click Insert Breakpoint.
4.6) On the Debug menu, click Continue.
5) Choose Continue again to finish debugging the stored procedure.
Enable CLR Debugging
1) Open Server Explorer.
2) In Server Explorer, right-click on the connection you want to debug and choose Allow SQL CLR Debugging. This setting enables SQL CLR debugging for all connections on the server.
3) A message box appears with the warning: "SQL CLR debugging will cause all managed threads on the server to stop. Do you want to continue?". When you are debugging SQL CLR database objects, breaking execution will break all threads on the server, affecting other users. For this reason, you should not debug SQL CLR applications on a production server.
4) Click Yes to enable debugging.


