Debugging tips in

Source: Internet
Author: User
Tags terminates

1. Sometimes you may need to tell debugger to break when some variable equals to a value as follows

If (Mystringvariable =   " Lkoh " )
Debugger. Break ();

refer to system. diagnostics namespace

Http://msdn.microsoft.com/en-us/library/system.diagnostics.debugger.break.aspx

2. Remember vs debugger shortcuts helps:

Shortcut Description
CTRL-alt-V,
Displays the auto window to view the values of variables currently in the scope of the current line of execution within the current procedure
CTRL-alt-break
Temporarily stops execution of all processes in a debugging session. available only in run Mode
Ctrl-Shift-F9
Clears all of the breakpoints in the project
CTRL-alt-Q
Displays the quick watch dialog with the current value of the selected expression. available only in break mode. use this command to check the current value of a variable, property, or other expression for which you have not defined a watch expression
Ctrl-Shift-F5
Terminates the current debugging session, rebuilds if necessary, and then starts a new debugging session. Available in break and run Modes
F5
If not currently debugging, this runs the startup project or projects and attaches the debugger. If in break mode, this allows execution to continue (I. e., it returns to run mode ).
Ctrl-F5
Runs the code without invoking the debugger. For console applications, this also arranges for the console window to stay open with a "press any key to continue" prompt when the program finishes
F11
Executes code one statement at a time, tracing execution into function CILS
Shift-F11
Executes the remaining lines of a function in which the current execution point lies
F10
Executes the next line of code but does not step into any function CILS
Shift-F5
Available in break and run modes, this terminates the debugging session
F9
Sets or removes a breakpoint at the current line

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.