这听起来很简单,但我就是无法让它工作。我安装了 Windows SDK 7.1 并打开了 Windows SDK 7.1 命令提示符。
我有一个代码test.c,如下:
#include <stdio.h>
#include <math.h>
void main()
{
int i;
for(i=1; i<10; i++)
printf("Hello world! This is line %d \n", i);
}
现在我想调试它。我首先使用以下方法编译它:
cl test.c /Z7
然后,打开:
mdbg test.exe
接下来发生的事情是:
MDbg (Managed debugger) v4.0.30319.1 (RTMRel.030319-0100) started.
Copyright (C) Microsoft Corporation. All rights reserved.
For information about commands type "help";
to exit program type "quit".
run test.exe
Hello world! This is line 1
Hello world! This is line 2
Hello world! This is line 3
Hello world! This is line 4
Hello world! This is line 5
Hello world! This is line 6
Hello world! This is line 7
Hello world! This is line 8
Hello world! This is line 9
STOP: Process Exited
就直接跑到了尽头,根本没有停下来。我什至没有机会设置断点...
我应该怎么办?
非常感谢大家。