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
它只是直接跑到終點,沒有停止在所有。我甚至沒有機會設置斷點...
我該怎麼辦?
非常感謝大家。