A basic introduction of the debugger features for those new to the F5 key.
The debugger in Visual Studio 2005 is an amazing piece of software. You can debug C# and C++, Visual Basic and VBScript. Step over managed code, native code, mobile code, and T-SQL code. You can debug locally, or you can debug remotely. You can debug assemblies hosted by SQL Server, and JavaScript hosted by Internet Explorer. There is just-in-time debugging and Just My Code debugging. You can step into XML web services and into XSL transformations. The debugger has data tips, and data visualizers, breakpoints and tracepoints. You can inspect threads, modules, memory, and call stacks; you can view both local and global variables.
If you have a bug you can’t track down with Visual Studio, you’ve got yourself a real sticky problem.
Comments
Have you checked DILE out yet?
DILE is something I want to check out - I'll make some time this afternoon.
+ Thank you for your kindness ;)
Are you looking to debug a production app? Take a look at : msdn.microsoft.com/.../default.asp
Thank you for that link. It was very helpful ;)
Thanks for a very nice article. I am trying to debug classic ASP pages with 2005 .Net IDE and have no luck I just see a triangle at the break point which says "The break point will not currently be hit. The Specified module has not been loaded."
I would appreciate any help.
Thanks
Rakesh
I'm afraid I have not tried any ASP debugging in quite some time.
Do you have debugging enabled in the virutal directory properties? In the MMC go to the virtual directory properties -> configuration -> debugging and check "Enable ASP server side debugging".
Now i press enter it starts running. I go to my Visual Studio attach to cmd.exe process and specify debug type as only 'Script', bu when i go back to my running documents i do not see the vbscript. Why is this happening? What do i need to do?
Are you using two slashes (cscript //X)? When I do that it prompts me to start a debugger.
Usually when I hit F5, VS will show autos, locals, and watch under the same window in different tabs docked on the left hand side of the screen. Output, call stack, breakpoints windows are on another window with different tabs docked on the right hand side of the screen. This is the default setting, and I like it.
The past few days, after I debug several times, VS undock all of the above windows and show some additional windows (Memory 1, memory 2, watch 1, watch 2, etc) everywhere on the screen. I have to close most of the windows and dock the necessary windows which slows me down. I have tried to delete the current.vssettings file, but the problem still persists. Would you please advise me on how to fix this problem? Thank you.
For VisualStudio 2005, do you need to install IIS or some other web server to debug web applications locally? I know you need to do so for VisualStudio 2003. Our security folks are balking at allowing IIS installation on our machines due to the hacker risk.
Philip Morrison (Philip.Morrison@ncmail.net)
As a last resort, I would run visual studio from the command line like so:
devenv /resetuserdata
This command should let you start clean. I'm not sure why it behaves that way for you.
You don't have to have IIS installed with VS2005. VS2005 comes with a little personal web server called WebDev (formerly Cassini). It only serves requests from the local machine.
There are some things IIS can do that WebDev can't. You might talk to your IT department about how to lock down IIS. It can run in a least priviledge account, and you could also configure IIS to only accept requests from the local machine or your network's sub.
Thank you for your article. May be I did not understand ALL the text but I have very simple question. Now I debug single .vbs file in VS2005 by opening it first in Sapien Primal Script program and choosing VS2005 as a debugging tool.
How can I debug single .vbs file in VS2005 without any another program?
My previous question was not about Sapien tool. The question is very simple:
Is any way to open .vbs-file from an Visual Studio 2005 Interface (or create any project - Which one) and debug it within Visual Studioo as it is possible for another types of files - such as .cpp?
cscript //X test.vbs
The //X command will launch the JIT debugging menu. Select VS2005 as the debugger to use and step right through the script code.
Your explanation is true but I can't modify code and restart debugging without using any other (that Visual Studio 2005) editor (notepad, for example).
The key question is: is any way to debug single .vbs file within Visual Studio 2005 environment by modifying code and restart debugging with saved breakpoints as I can do this with any other (except vbs and js) source files?
Thank you very much for you attempting to help us.
Vladimir: the only thing I can think of to do is to create a blank solution and add your vbs files. Perhaps that will give Visual Studio a place to store settings. Sorry I can't be more helpful.
Robert: VS2005 "customizes" the menus according to the developer type you picked during install. The good news is you can add those commands back in. Go to Tools -> Customize. In the "Categories" list box chose "Debug", then find the "Step Into" in the list on the right. Drag the command onto the menu where you want the command to appear.
Make sense?
i went through your website. its quite useful. i am a software engineer by profession and recently started using visual studio 2005 for c++ project. I have a question about breakpoint. I accidentally closed the complete session which had 60 breakpoints all over my project files. I opened the same project again by start->program files -> visual studio 2005... route. All of my breakpoints are gone!! Is there anyway to retrieve them? I don't want to go through entire code again and put them where I was in need of. Are these breakpoints session-based even in same project?
Frustrating... my email address is: ppgandhi11@hotmail.com I will appreciate if you can put me at ease by answering it asap. thanks.
prashant-