How do you use the Immediate Window in Visual Studio?

前端 未结 3 1144
余生分开走
余生分开走 2020-11-30 16:35

The Immediate Window is an immensely useful tool for debugging applications. It can be used to execute code statements that are valid in the context of a break point and ins

3条回答
  •  渐次进展
    2020-11-30 17:32

    The Immediate window is used to debug and evaluate expressions, execute statements, print variable values, and so forth. It allows you to enter expressions to be evaluated or executed by the development language during debugging.

    To display Immediate Window, choose Debug >Windows >Immediate or press Ctrl-Alt-I

    Here is an example with Immediate Window:

    int Sum(int x, int y) { return (x + y);}
    void main(){
    int a, b, c;
    a = 5;
    b = 7;
    c = Sum(a, b);
    char temp = getchar();}
    

    add breakpoint

    call commands

    https://msdn.microsoft.com/en-us/library/f177hahy.aspx

提交回复
热议问题