Debugging Stored Procs does not work

  • Hello all,

    This is my first post here and though I'm not sure if I should put this in the TSQL section instead, I'll place it here in case CLR Integration and Programming doesn't mean the same as CLR Integration and CLR Programming. I do have a programming question, though it doesn't likely involve CLR.

    I have one small Stored Procedure which I'm trying to debug. I have found several tutorials around the web that tell me how I should do that using VS 2005, but anytime I get to the point where I should be able to insert a breakpoint into the TSQL code, I get the message that I can't insert a breakpoint. It does so on any line I try, so obviously I must've missed something. I also don't get the opportunity to click on 'step into stored procedure', but that could be because there isn't much to step into if there's no break. I have heard that I require a full version of Visual Studio, and I do have a Premier Partner Edition (ENU Service Pack 1) so I can't imagine that that isn't enough, but one can of course never be sure. Can anyone help me out here? I would really appreciate it.

    Best regards,

    Oscar Janson

    Modest Automatisering B.V.

  • Welcome 😉

    Indeed when googling the web many solutions go about clr-debugging.

    For debugging an tsql-sproc with VS2005 (bi devstudio2005) ..

    Don't use the CLR way !

    Just:

    - create a new db project

    then

    - Open the serverexplorer

    - pick your connection to the db

    - browse to the stored proc and rightclick the proc you want to debug

    select "step into procedure"

    set your brakepoints and off you go

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Hi there!

    Thank you for your swift reply! I think the problem starts with the fact I didn't start a db project. I haven't found anything in my new projects options that literally says Database project however.

    I started out with Analysis Services Project before I posted here, and that didn't work. My other options are Integration Services Project, Import Analysis Services 9.0 yadayada and some report things. When I try Analysis services, I can open the stored procedure in the server explorer, but I can't put break points, nor can I select step into procedure. 🙁

    Am I missing something here?

    Best regards,

    Oscar Janson

    Modest Automatisering B.V.

  • the "database project" icon is not in the same group as the Integration server or report server icon (Business Intelligence Projects), but you can find it in the "visual basic" group.

    In my case, I can start the server explorer direct (ctrl+alt+S), pick my connection to the db (with the correct authorities !) browse to the procs, rightclick on one of them and select "step into.."

    btw: I am on SQL2005 sp2 + CU4

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • I can't find the icon unfortunately. To make matters worse, I don't really have a working internet connection on my second dev pc, so I can't get the latest servicepack even if I wanted to. I found the server explorer too, but does it work for you in any other kind of project than database? I can easily browse the server here without even having a project open, yet not debug.

  • I have a Windows Application built in VB and I was able to step into one of my stored procedures. However, I haven't determined how to do this while running my application (and I wasn't sure if that was something you needed to do or not).

    I am running Visual Studio 2005 Professional Edition w/SP1 so I am not sure if that is much different then the edition you are running.

    Let me know if there is anything I can check for you.

    Ian.

    "If you are going through hell, keep going."
    -- Winston Churchill

  • Hello Ian,

    I tried to type you a message, but there was an error. In short, could you try to run the SP without an active project for me? Thanks for your time and effort!

    Best regards,

    Oscar Janson

    Modest Automatering B.V.

  • I've tried and succeeded to "step into" the proc directly from a started VS2005 (without an open project) using the serverbrowser.

    I haven't got a clue what's going wrong in your case.

    Do you have the needed authorities to perform the debug ?

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • That at least proves that the related project could not be the issue.

    I have no clue either. I happen to have things like these quite often.

    Impossible situations which works perfectly for everyone else and me asking myself why it simply won't work for me on the first try for once... 🙁 Knowing these things in advance does makes it easier to anticipate that something most likely will go wrong however, and I hardly ever pass a good challenge 😉

    I should be having the correct authorities to perform what I need. I have followed the steps put forth by Microsoft to the letter, double checked everything.. the right ports enabled, the remote debug monitor thingy installed (despite the fact I work locally both for VS and SS2K5), I have administrator rights on my pc, and on the SQL server I even have my own account checked for having the sysadmin role. (In fact, all roles except bulkadmin)

  • Oscar,

    When you right click on a stored procedure, what is available to you? Does it have the following options, but with some things greyed out?

    Add New Stored Procedure

    Open

    Execute

    Step Into Stored Procedure

    Copy

    Delete

    Refresh

    Properties

    (Also in attachment)

    I know what you mean about not able to get something to work when everyone else is able to do it. Just yesterday, I spent a few hours trying to determine why my program wouldn't run properly, to find out it was a stupid little option that I deselected for a different problem.:pinch:

    With these problems, I usually spend more time then I need to in order to figure it out. But, you sometimes learn new things. Hopefully we can figure out your problem.

    Ian.

    "If you are going through hell, keep going."
    -- Winston Churchill

  • Hi Ian,

    I've looked at your screenshot, but I don't have the option greyed out... I've attached the image as it looks here..

    It's unfortunate things like these happen, but luckily we live in a world where the greatest minds can talk freely across the globe, and where one finds greatly helpful folks on fora such as these.. I'm the only programmer in this company, and having other people on the net helping me out really makes a difference, and it makes me feel less alone when facing the most baffling riddles... I really appreciate all your time and patience and effort, so thanks again guys 🙂

  • Oscar,

    Unfortunately, I have some bad news. After doing a little research I learned that the data tools in your version of Visual Studio are comparable to the Standard Edition.

    (See Note 1):

    http://msdn2.microsoft.com/en-us/library/bb129445(VS.80).aspx

    From what I found in the help, the feature you want is only available in the professional edition:

    http://msdn2.microsoft.com/en-us/library/yet1b7by(VS.80).aspx

    Maybe you could convince your company you need the professional version.

    Ian.

    "If you are going through hell, keep going."
    -- Winston Churchill

  • Now that's unfortunate.. ah well.. thank you again for your time!

Viewing 13 posts - 1 through 12 (of 12 total)

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