Jump to content
  • Advertisement
Sign in to follow this  
potato2008

[.net] debug in asp.net

This topic is 3011 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, i create a function like this private void xxx() { int x = 0; sqlconnect cn; string sql = "insert ......"; ..... execute sql command } i debug it in step over, when the program run and stop at first line, i stop it, but the following code still run util exit function, why?

Share this post


Link to post
Share on other sites
Advertisement
I am not quite sure whether I understand your question or not.

Can you trace the database? By adding tracing you could make sure that you are correctly connecting to the database. Try running the query directly in the database so you know that the query is correct.

Share this post


Link to post
Share on other sites
It doesn't stop the execution of the page because you're only debugging the web application, you're not debugging the server that is executing the application. If all you did was hit F5 without any extra setup, then you're using the built-in ASP.NET Development Server, in which case it *should* stop when you stop the debugger. However, if you set up your application to execute in IIS, then the debugger can't shut down IIS when you stop the debugger, so IIS will finish processing the last request while Visual Studio closes the browser window.

BTW, stop building queries in strings in your application code. Use a stored procedure.

Share this post


Link to post
Share on other sites
right click your project in the Solution Explorer in Visual Studio and select "Properties". In this window, select the "Web" tab. Under the "Servers" selection, check the "Use Visual Studio Development Server" radio button.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!