none
SSMS debugger out of sync when stepping through code

    Question

  • Running SSMS 2012 against SQL 2008 to debug an SP that calls another SP.    The first few times, the stepping (f10) matches the sp source code line by line.   Later on, I fixed a bug in the sp and altered sp.  Now when I step line by line, SQL loads the wrong/old sp code in the editor and the line stepping is all out of whack!  In C# world, I would describe this as "Symbols out of sync with loaded DLL".

    I have tried dbcc freeproccache to no avail.  How do I fix this issue?

    Saturday, February 09, 2013 6:00 AM

Answers

  • Hello,

    Did you modify the stroed procedure using an ALTER PROCEDURE script? If so, Please try to restart the SSMS before debug the altered stroed procedure or you can try do modify the procedure by suing DROP PROCEDURE + CREATE PROCEDURE.

    Regards,

    Fanny Liu

    If you have any feedback on our support, please click here .


    Fanny Liu
    TechNet Community Support

    • Marked as answer by scott_m Monday, February 11, 2013 4:05 AM
    Monday, February 11, 2013 3:56 AM
    Moderator

All replies

  • Hello,

    Did you modify the stroed procedure using an ALTER PROCEDURE script? If so, Please try to restart the SSMS before debug the altered stroed procedure or you can try do modify the procedure by suing DROP PROCEDURE + CREATE PROCEDURE.

    Regards,

    Fanny Liu

    If you have any feedback on our support, please click here .


    Fanny Liu
    TechNet Community Support

    • Marked as answer by scott_m Monday, February 11, 2013 4:05 AM
    Monday, February 11, 2013 3:56 AM
    Moderator
  • Hello,

    Did you modify the stroed procedure using an ALTER PROCEDURE script? If so, Please try to restart the SSMS before debug the altered stroed procedure or you can try do modify the procedure by suing DROP PROCEDURE + CREATE PROCEDURE.

    Regards,

    Fanny Liu

    If you have any feedback on our support, please click here.


    Fanny Liu
    TechNet Community Support

    Restarting SSMS fixed the sproc debug/sync issue.

    If developers modifying C# code had to restart Visual Studio to get accurate debug/stepping going there would be rioting masses.

    Monday, February 11, 2013 4:05 AM