0

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?

2
  • What about using a break-point actually form SSMS ?? Commented Jun 8, 2017 at 6:50
  • I know for break points. I would to know if there is command to do this. Using command is much easier sometimes (if command like that exists, of course). Commented Jun 8, 2017 at 7:55

2 Answers 2

2

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

Sign up to request clarification or add additional context in comments.

4 Comments

I would like to see further execution, based on those values. That is why I need to stop execution at certain point.
Can you give more specific detail?
I have a stored procedure with many rows. I need to stop execution at the beginning of this stored procedure. I haven't pasted whole procedure for the sake of simplicity.
There's no way you can pause it. So, you have two options select the exact part you want to execute or run full execution. There is a stop execution button but I don't think that' what you are looking for.
1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.