Is there a command in SSMS to pause execution at selected point, like putting break point?
Example:
declare @i int
declare @b int
debugger // stop execution here
select * from myTable
Something like debugger command in javascript?
Is there a command in SSMS to pause execution at selected point, like putting break point?
Example:
declare @i int
declare @b int
debugger // stop execution here
select * from myTable
Something like debugger command in javascript?
If you want to execute a certain part only then you can select only that part and execute it. If you want to execute only this part then you select this and
declare @i int
declare @b int
press F5 or the click on the execute button.
And later on you can execute this part. select * from myTable
usually debugging an sp is tricky i use print statement in every loop so i can know that it entered that loop and the best way is to put them in a transaction and instead of commeting the transaction just rollback the transaction by this way your database will be intact too and also print the variables so you can know the values