Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
nmarks
Yak Posting Veteran
53 Posts |
Posted - 2008-05-01 : 09:19:19
|
| Hi I have just had to reinstall Visual Studio on my laptop after months of merry developing.To debug the sprocs I have written I made use of Visual Studio's "Step into Procedure" facility that lets you run your code line by line. Its a great feature.With the new installation in place if I right click on a sproc of interest I no longer get "Step into Procedure" on the pop-up menu.I remember we had a bit of trouble making it appear when we installed Visual Studio last year. My boss was around that time and fixed it for me. Today he's not around.Anyone know how to make "Step into Procedure" appear? Is there some option in Tools or something?Your help will be greatly appreciated. |
|
|
nmarks
Yak Posting Veteran
53 Posts |
Posted - 2008-05-01 : 11:48:46
|
| I found it.You have to:(1) open an existing or create a new project(2) click Project > Properties (3) click on the Debugging tab(4) click Enable SQL debugging.Why-oh-why don't Microsoft have this enabled as a default when you install Visual Studio? Its ridiculous users should have to waste valuable time searching for this. |
 |
|
|
nmarks
Yak Posting Veteran
53 Posts |
Posted - 2008-05-02 : 05:52:08
|
| Even if you have followed these steps there still maybe another obstacle to debugging SQL in Visual Studio.If your SQL Server connection logs onto SQL Server using SQL Authentication (say using the sa account) rather than using Windows Authentication, Visual Studio will not allow you step into the stored procedure.The question is how do you overcome this problem?(1) Go into SQL Server(2) Go into you database and click Security.(3) In Security right click on Logins(4) Click Add new login(5) In the top box type the following : [SERVERNAME]/[WINDOWSACCOUNTNAME](6) Tick sysadmin.(7) Click OK.SERVERNAME is the name of the server your databse is residing on and is shown at the top of the tree in the Object Explorer.WINDOWSACCOUNTNAME is the name of the account you log on to when you log on to Windows.Now restart Visual Studio and you should find when you go to Step into Stored Procedure it should work just fine. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-05-02 : 05:58:57
|
quote: Originally posted by nmarks Even if you have followed these steps there still maybe another obstacle to debugging SQL in Visual Studio.If your SQL Server connection logs onto SQL Server using SQL Authentication (say using the sa account) rather than using Windows Authentication, Visual Studio will not allow you step into the stored procedure.The question is how do you overcome this problem?(1) Go into SQL Server(2) Go into you database and click Security.(3) In Security right click on Logins(4) Click Add new login(5) In the top box type the following : [SERVERNAME]/[WINDOWSACCOUNTNAME](6) Tick sysadmin.(7) Click OK.SERVERNAME is the name of the server your databse is residing on and is shown at the top of the tree in the Object Explorer.WINDOWSACCOUNTNAME is the name of the account you log on to when you log on to Windows.Now restart Visual Studio and you should find when you go to Step into Stored Procedure it should work just fine.
Thanks for sharing this piece of info |
 |
|
|
|
|
|