[sorry but my first post got a "non-answer" so I am reposting]
I have followed examples in a couple of books but am still unable to step
into Stored Procedures in VS.NET.
I enable sql debugging in the project properties, open the sp in server
explorer and highlight a line where I want to start stepping through, then I
select a line in my VB code such as cmd.ExecuteNonQuery().
But vs.net does not step into the SP it just steps over the
cmd.ExecuteNonQuery() even though I am clicking on the Step Into icon on the
toolbar (F8 doesn't work on my computer)
Am I missing something?
Thanks,
GG Dean Blake wrote:
> [sorry but my first post got a "non-answer" so I am reposting]
> I have followed examples in a couple of books but am still unable to
> step into Stored Procedures in VS.NET.
> I enable sql debugging in the project properties, open the sp in
> server explorer and highlight a line where I want to start stepping
> through, then I select a line in my VB code such as
> cmd.ExecuteNonQuery().
> But vs.net does not step into the SP it just steps over the
> cmd.ExecuteNonQuery() even though I am clicking on the Step Into icon
> on the toolbar (F8 doesn't work on my computer)
>
Have you browsed through the other questions in this newsgroup? Have you
seen any questions dealing with vs.net? Maybe that should be an indication
that you've asked in the wrong place.
There are several newsgroups (communities) set up for the .Net framework -
they all have the word "dotnet" in their names. The one you want probably
has both "vsnet" and "debug" or "debugging" in its name. I don't have time
to find it right now, but I think you have enough clues now to find it
yourself ... :-)
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.|||Well, the two answers I have gotten in other groups (.net groups) were that
it doesn't work but everyone seems pretty closed mouth about it. Since
practical alternatives might be to use another tool, I though I would try
this group since (1) a lot of people here probably debug stored procedures,
and (23) most MS oriented developers use .net anyway.
but, I am very sorry for asking here.
G
"Bob Barrows [MVP]" <reb01501@.NOyahoo.SPAMcom> wrote in message
news:OCyHmTiCFHA.520@.TK2MSFTNGP09.phx.gbl...
>G Dean Blake wrote:
> Have you browsed through the other questions in this newsgroup? Have you
> seen any questions dealing with vs.net? Maybe that should be an indication
> that you've asked in the wrong place.
> There are several newsgroups (communities) set up for the .Net framework -
> they all have the word "dotnet" in their names. The one you want probably
> has both "vsnet" and "debug" or "debugging" in its name. I don't have time
> to find it right now, but I think you have enough clues now to find it
> yourself ... :-)
> Bob Barrows
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>|||G Dean Blake wrote:
> Well, the two answers I have gotten in other groups (.net groups)
> were that it doesn't work but everyone seems pretty closed mouth
> about it. Since practical alternatives might be to use another tool,
> I though I would try this group since (1) a lot of people here
> probably debug stored procedures,
This is true. But most people in this group generally concentrate on using
SQL Query Analyzer for this. My suggestion is to try and get debugging
working in Query Analyzer. This seems to be a prerequisite for getting it to
work in vs.net, at least in my experience.
> and (23) most MS oriented
> developers use .net anyway.
This is not true. .Net is still relatively new.
> but, I am very sorry for asking here.
> G
Oops, you're apologizing. I did not intend to make you feel as if you had to
apologize. I was trying to explain why you weren't getting help here. I
worded my reply badly so I apologize. (kumbaya ... ) <grin>
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Showing posts with label couple. Show all posts
Showing posts with label couple. Show all posts
Friday, February 24, 2012
Tuesday, February 14, 2012
Debug - How to Step into
I have a stored procedure, in the name Proc_UpdateProductionShare. This
procedure has got a select statement and a couple of update statements. I
wish to debug this stored procedure. By debug i mean that i wish to step
into the procedure code line by line and debug it. I also have used some
local variable and setting the values to these variables based on the
actions in the procedure. I also need to trace the value of these local
variables.
For this i had used the T-SQL Debugger. In Query Analyzer i had opened the
Object Browser. In the object browser i had selected the database in which
the stored procedure resides. Then i had selected the particular stored
procedure and right clicked on the stored procedure and selected the "Debug"
option. A small dialog window opened mentioning the stored procedure i had
selected and also listing the parameters for this stored procedure, it's
data type, type of the parameter (input or output) and the value text field.
Since in this particular procedure i had a input parameter (int datatype) to
be passed on, it was listed. I specified the value for this parameter and
then clicked "Execute" button.
This opened the source code of the procedure, in a new pane at the top. But
when press "F5" or click the "Go" button in this pane's toolbar, the
procedure executes immediately and completes execution. Iam not able to step
into each line of the stored procedure and execute it one by one and
checking the result of the execution of each and every line. Then i also
tried by setting breakpoints at 2, 3 lines of the code and then clicked the
"Go" button. But this time too the procedure completed execution without
stopping execution at the breakpoints.
All i need is to use the "F11 (step into)" and "F10 (step out)" buttons to
check the execution. These buttons were enabled only for a fraction of
second after the "Go" button is clicked. But before i start using them, the
procedure execution completes and these buttons get disabled. How do i do
this task '
I searched for help in BOL. But i was not able to find any useful info on
this part. Can you tell me the steps to be followed to debug a stored
procedure or mention some links where, i can get info regarding this.
Thanks in Advance.
With Regard,
SQL UserThere's a troubleshooting section about the debugger in Books Online. Did
you find it? Also, make sure you have the updated Books Online:
http://www.microsoft.com/SQL/techinfo/productdoc/2000/default.asp
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"MS User" <sqlman@.sql.com> wrote in message
news:eKeMw%23KpDHA.2776@.tk2msftngp13.phx.gbl...
> I have a stored procedure, in the name Proc_UpdateProductionShare. This
> procedure has got a select statement and a couple of update statements. I
> wish to debug this stored procedure. By debug i mean that i wish to step
> into the procedure code line by line and debug it. I also have used some
> local variable and setting the values to these variables based on the
> actions in the procedure. I also need to trace the value of these local
> variables.
> For this i had used the T-SQL Debugger. In Query Analyzer i had opened the
> Object Browser. In the object browser i had selected the database in which
> the stored procedure resides. Then i had selected the particular stored
> procedure and right clicked on the stored procedure and selected the
"Debug"
> option. A small dialog window opened mentioning the stored procedure i had
> selected and also listing the parameters for this stored procedure, it's
> data type, type of the parameter (input or output) and the value text
field.
> Since in this particular procedure i had a input parameter (int datatype)
to
> be passed on, it was listed. I specified the value for this parameter and
> then clicked "Execute" button.
> This opened the source code of the procedure, in a new pane at the top.
But
> when press "F5" or click the "Go" button in this pane's toolbar, the
> procedure executes immediately and completes execution. Iam not able to
step
> into each line of the stored procedure and execute it one by one and
> checking the result of the execution of each and every line. Then i also
> tried by setting breakpoints at 2, 3 lines of the code and then clicked
the
> "Go" button. But this time too the procedure completed execution without
> stopping execution at the breakpoints.
> All i need is to use the "F11 (step into)" and "F10 (step out)" buttons to
> check the execution. These buttons were enabled only for a fraction of
> second after the "Go" button is clicked. But before i start using them,
the
> procedure execution completes and these buttons get disabled. How do i do
> this task '
> I searched for help in BOL. But i was not able to find any useful info on
> this part. Can you tell me the steps to be followed to debug a stored
> procedure or mention some links where, i can get info regarding this.
> Thanks in Advance.
> With Regard,
> SQL User
>|||It's already going when that last window opens
Note the yellow arrow is present.
So just hit StepOver to run just the first line.
Bye,
Delbert Glass|||Thanks for pointing to the right direction.
It was permission to execute the SP_SDIDEBUG extended procedure AND
It is disabled for security reasons. To enable Transact-SQL Debugger for
legacy clients, a member of the sysadmins server role, such as "sa," must
explicitly enable debugging by running the following code:
Exec sp_sdidebug 'legacy_on'
You must repeat this procedure whenever you restart the server. It is not
recommended to use Transact-SQL Debugger on a production server.
To disable Transact-SQL Debugger for legacy clients after you enable it, as
a member of the sysadmins server role, you can run the following code:
Exec sp_sdidebug 'legacy_off'
HTH
Shamim
"Tibor Karaszi" <tibor.please_reply_to_public_forum.karaszi@.cornerstone.se>
wrote in message news:%23q2yjVLpDHA.2592@.TK2MSFTNGP10.phx.gbl...
> There's a troubleshooting section about the debugger in Books Online. Did
> you find it? Also, make sure you have the updated Books Online:
> http://www.microsoft.com/SQL/techinfo/productdoc/2000/default.asp
> --
> Tibor Karaszi, SQL Server MVP
> Archive at:
>
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
>
> "MS User" <sqlman@.sql.com> wrote in message
> news:eKeMw%23KpDHA.2776@.tk2msftngp13.phx.gbl...
> > I have a stored procedure, in the name Proc_UpdateProductionShare. This
> > procedure has got a select statement and a couple of update statements.
I
> > wish to debug this stored procedure. By debug i mean that i wish to step
> > into the procedure code line by line and debug it. I also have used some
> > local variable and setting the values to these variables based on the
> > actions in the procedure. I also need to trace the value of these local
> > variables.
> >
> > For this i had used the T-SQL Debugger. In Query Analyzer i had opened
the
> > Object Browser. In the object browser i had selected the database in
which
> > the stored procedure resides. Then i had selected the particular stored
> > procedure and right clicked on the stored procedure and selected the
> "Debug"
> > option. A small dialog window opened mentioning the stored procedure i
had
> > selected and also listing the parameters for this stored procedure, it's
> > data type, type of the parameter (input or output) and the value text
> field.
> > Since in this particular procedure i had a input parameter (int
datatype)
> to
> > be passed on, it was listed. I specified the value for this parameter
and
> > then clicked "Execute" button.
> >
> > This opened the source code of the procedure, in a new pane at the top.
> But
> > when press "F5" or click the "Go" button in this pane's toolbar, the
> > procedure executes immediately and completes execution. Iam not able to
> step
> > into each line of the stored procedure and execute it one by one and
> > checking the result of the execution of each and every line. Then i also
> > tried by setting breakpoints at 2, 3 lines of the code and then clicked
> the
> > "Go" button. But this time too the procedure completed execution without
> > stopping execution at the breakpoints.
> >
> > All i need is to use the "F11 (step into)" and "F10 (step out)" buttons
to
> > check the execution. These buttons were enabled only for a fraction of
> > second after the "Go" button is clicked. But before i start using them,
> the
> > procedure execution completes and these buttons get disabled. How do i
do
> > this task '
> >
> > I searched for help in BOL. But i was not able to find any useful info
on
> > this part. Can you tell me the steps to be followed to debug a stored
> > procedure or mention some links where, i can get info regarding this.
> >
> > Thanks in Advance.
> >
> > With Regard,
> > SQL User
> >
> >
>
procedure has got a select statement and a couple of update statements. I
wish to debug this stored procedure. By debug i mean that i wish to step
into the procedure code line by line and debug it. I also have used some
local variable and setting the values to these variables based on the
actions in the procedure. I also need to trace the value of these local
variables.
For this i had used the T-SQL Debugger. In Query Analyzer i had opened the
Object Browser. In the object browser i had selected the database in which
the stored procedure resides. Then i had selected the particular stored
procedure and right clicked on the stored procedure and selected the "Debug"
option. A small dialog window opened mentioning the stored procedure i had
selected and also listing the parameters for this stored procedure, it's
data type, type of the parameter (input or output) and the value text field.
Since in this particular procedure i had a input parameter (int datatype) to
be passed on, it was listed. I specified the value for this parameter and
then clicked "Execute" button.
This opened the source code of the procedure, in a new pane at the top. But
when press "F5" or click the "Go" button in this pane's toolbar, the
procedure executes immediately and completes execution. Iam not able to step
into each line of the stored procedure and execute it one by one and
checking the result of the execution of each and every line. Then i also
tried by setting breakpoints at 2, 3 lines of the code and then clicked the
"Go" button. But this time too the procedure completed execution without
stopping execution at the breakpoints.
All i need is to use the "F11 (step into)" and "F10 (step out)" buttons to
check the execution. These buttons were enabled only for a fraction of
second after the "Go" button is clicked. But before i start using them, the
procedure execution completes and these buttons get disabled. How do i do
this task '
I searched for help in BOL. But i was not able to find any useful info on
this part. Can you tell me the steps to be followed to debug a stored
procedure or mention some links where, i can get info regarding this.
Thanks in Advance.
With Regard,
SQL UserThere's a troubleshooting section about the debugger in Books Online. Did
you find it? Also, make sure you have the updated Books Online:
http://www.microsoft.com/SQL/techinfo/productdoc/2000/default.asp
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"MS User" <sqlman@.sql.com> wrote in message
news:eKeMw%23KpDHA.2776@.tk2msftngp13.phx.gbl...
> I have a stored procedure, in the name Proc_UpdateProductionShare. This
> procedure has got a select statement and a couple of update statements. I
> wish to debug this stored procedure. By debug i mean that i wish to step
> into the procedure code line by line and debug it. I also have used some
> local variable and setting the values to these variables based on the
> actions in the procedure. I also need to trace the value of these local
> variables.
> For this i had used the T-SQL Debugger. In Query Analyzer i had opened the
> Object Browser. In the object browser i had selected the database in which
> the stored procedure resides. Then i had selected the particular stored
> procedure and right clicked on the stored procedure and selected the
"Debug"
> option. A small dialog window opened mentioning the stored procedure i had
> selected and also listing the parameters for this stored procedure, it's
> data type, type of the parameter (input or output) and the value text
field.
> Since in this particular procedure i had a input parameter (int datatype)
to
> be passed on, it was listed. I specified the value for this parameter and
> then clicked "Execute" button.
> This opened the source code of the procedure, in a new pane at the top.
But
> when press "F5" or click the "Go" button in this pane's toolbar, the
> procedure executes immediately and completes execution. Iam not able to
step
> into each line of the stored procedure and execute it one by one and
> checking the result of the execution of each and every line. Then i also
> tried by setting breakpoints at 2, 3 lines of the code and then clicked
the
> "Go" button. But this time too the procedure completed execution without
> stopping execution at the breakpoints.
> All i need is to use the "F11 (step into)" and "F10 (step out)" buttons to
> check the execution. These buttons were enabled only for a fraction of
> second after the "Go" button is clicked. But before i start using them,
the
> procedure execution completes and these buttons get disabled. How do i do
> this task '
> I searched for help in BOL. But i was not able to find any useful info on
> this part. Can you tell me the steps to be followed to debug a stored
> procedure or mention some links where, i can get info regarding this.
> Thanks in Advance.
> With Regard,
> SQL User
>|||It's already going when that last window opens
Note the yellow arrow is present.
So just hit StepOver to run just the first line.
Bye,
Delbert Glass|||Thanks for pointing to the right direction.
It was permission to execute the SP_SDIDEBUG extended procedure AND
It is disabled for security reasons. To enable Transact-SQL Debugger for
legacy clients, a member of the sysadmins server role, such as "sa," must
explicitly enable debugging by running the following code:
Exec sp_sdidebug 'legacy_on'
You must repeat this procedure whenever you restart the server. It is not
recommended to use Transact-SQL Debugger on a production server.
To disable Transact-SQL Debugger for legacy clients after you enable it, as
a member of the sysadmins server role, you can run the following code:
Exec sp_sdidebug 'legacy_off'
HTH
Shamim
"Tibor Karaszi" <tibor.please_reply_to_public_forum.karaszi@.cornerstone.se>
wrote in message news:%23q2yjVLpDHA.2592@.TK2MSFTNGP10.phx.gbl...
> There's a troubleshooting section about the debugger in Books Online. Did
> you find it? Also, make sure you have the updated Books Online:
> http://www.microsoft.com/SQL/techinfo/productdoc/2000/default.asp
> --
> Tibor Karaszi, SQL Server MVP
> Archive at:
>
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
>
> "MS User" <sqlman@.sql.com> wrote in message
> news:eKeMw%23KpDHA.2776@.tk2msftngp13.phx.gbl...
> > I have a stored procedure, in the name Proc_UpdateProductionShare. This
> > procedure has got a select statement and a couple of update statements.
I
> > wish to debug this stored procedure. By debug i mean that i wish to step
> > into the procedure code line by line and debug it. I also have used some
> > local variable and setting the values to these variables based on the
> > actions in the procedure. I also need to trace the value of these local
> > variables.
> >
> > For this i had used the T-SQL Debugger. In Query Analyzer i had opened
the
> > Object Browser. In the object browser i had selected the database in
which
> > the stored procedure resides. Then i had selected the particular stored
> > procedure and right clicked on the stored procedure and selected the
> "Debug"
> > option. A small dialog window opened mentioning the stored procedure i
had
> > selected and also listing the parameters for this stored procedure, it's
> > data type, type of the parameter (input or output) and the value text
> field.
> > Since in this particular procedure i had a input parameter (int
datatype)
> to
> > be passed on, it was listed. I specified the value for this parameter
and
> > then clicked "Execute" button.
> >
> > This opened the source code of the procedure, in a new pane at the top.
> But
> > when press "F5" or click the "Go" button in this pane's toolbar, the
> > procedure executes immediately and completes execution. Iam not able to
> step
> > into each line of the stored procedure and execute it one by one and
> > checking the result of the execution of each and every line. Then i also
> > tried by setting breakpoints at 2, 3 lines of the code and then clicked
> the
> > "Go" button. But this time too the procedure completed execution without
> > stopping execution at the breakpoints.
> >
> > All i need is to use the "F11 (step into)" and "F10 (step out)" buttons
to
> > check the execution. These buttons were enabled only for a fraction of
> > second after the "Go" button is clicked. But before i start using them,
> the
> > procedure execution completes and these buttons get disabled. How do i
do
> > this task '
> >
> > I searched for help in BOL. But i was not able to find any useful info
on
> > this part. Can you tell me the steps to be followed to debug a stored
> > procedure or mention some links where, i can get info regarding this.
> >
> > Thanks in Advance.
> >
> > With Regard,
> > SQL User
> >
> >
>
debbuging SPs in VS.NET
I have followed examples in a couple of books but am still unable to step
into Stored Procedures in VS.NET.
I enable sql debugging in the project properties, open the sp in server
explorer and highlight a line where I want to start stepping through, then I
select a line in my VB code such as cmd.ExecuteNonQuery().
But vs.net does not step into the SP it just steps over the
cmd.ExecuteNonQuery() even though I am clicking on the Step Into icon on the
toolbar (F8 doesn't work on my computer)
Am I missing something?
Thanks,
GAnswered in .NET groups
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"G Dean Blake" wrote:
> I have followed examples in a couple of books but am still unable to step
> into Stored Procedures in VS.NET.
> I enable sql debugging in the project properties, open the sp in server
> explorer and highlight a line where I want to start stepping through, then
I
> select a line in my VB code such as cmd.ExecuteNonQuery().
> But vs.net does not step into the SP it just steps over the
> cmd.ExecuteNonQuery() even though I am clicking on the Step Into icon on t
he
> toolbar (F8 doesn't work on my computer)
> Am I missing something?
> Thanks,
> G
>
>
into Stored Procedures in VS.NET.
I enable sql debugging in the project properties, open the sp in server
explorer and highlight a line where I want to start stepping through, then I
select a line in my VB code such as cmd.ExecuteNonQuery().
But vs.net does not step into the SP it just steps over the
cmd.ExecuteNonQuery() even though I am clicking on the Step Into icon on the
toolbar (F8 doesn't work on my computer)
Am I missing something?
Thanks,
GAnswered in .NET groups
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"G Dean Blake" wrote:
> I have followed examples in a couple of books but am still unable to step
> into Stored Procedures in VS.NET.
> I enable sql debugging in the project properties, open the sp in server
> explorer and highlight a line where I want to start stepping through, then
I
> select a line in my VB code such as cmd.ExecuteNonQuery().
> But vs.net does not step into the SP it just steps over the
> cmd.ExecuteNonQuery() even though I am clicking on the Step Into icon on t
he
> toolbar (F8 doesn't work on my computer)
> Am I missing something?
> Thanks,
> G
>
>
Subscribe to:
Posts (Atom)