0
这听起来很简单,但我不能得到它的工作。我安装了Windows SDK 7.1并打开了Windows SDK 7.1命令提示符。使用mdbg调试简单的C代码与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
它只是直接跑到终点,没有停止在所有。我甚至没有机会设置断点...
我该怎么办?
非常感谢大家。