Remote debugging of stored procedures

  • Is there any way to set a breakpoint in a stored procedure that will trigger when it's being executed naturally by the application rather that having to manually 'step into' it from Visual Studio.

    Classic ASP website (No I'm not kidding :o()

    SQL Server 2000/2005 (Remote)

    Visual Studio 2005/2008 (local)

    Thanks.

  • Depends on what you mean by a breakpoint. You can always add return/print/raiserror/insert commands into a proc, and follow them with "return", which will stop the proc at that point. Can make those conditional, so adding "@Debug_in" as a bit-type input parameter with a default of 0, and when you want to use the break point, provide a 1 to that parameter and it fires off whatever you're looking for.

    Does that help?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Thanks for that.

    What I really need is breakpoint that can be set and debugged via Visual Studio.

  • I must be misreading your original post. It seemed there that you didn't want to step into it from Visual Studio. What am I misunderstanding here?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • I dont want to manually create a 'fake' scenario stepping into the stored proc and supplying input vars. Instead I want the website to run as normal, and when it hits a breakpoint in a stored proc.. I can debug it from there in Visual Studio..

    Basically to more closely replicate the real-world scenario.

    Thanks.

  • I don't actually know if that's possible or not. I've never tried to debug a web page, so I haven't looked into that option. Might be possible in SQL 2008. They added more debugging tools in that.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • The same would apply to an application that talks to a remote SQL server though. It's not really website specific.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply