概要
windows10でewdk、やってみた。
premake5でプロジェクト作って、ブレークポイント書いて、msbuildして、windbgでデバッグしてみた。
手順
>f:\LaunchBuildEnv.cmd
**********************************************************************
** Enterprise Windows Driver Kit (WDK) build environment
** Version ge_release_svc_prod1.26100.6584
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.14.5
** Copyright (c) 2025 Microsoft Corporation
**********************************************************************
>set PATH=%PATH%;f:\Program Files\Windows Kits\10\Debuggers\x64
>cd premake
>cd dbg0
>premake5 vs2022
Building configurations...
Running action 'vs2022'...
Generated MyProject.sln...
Generated MyApp.vcxproj...
Done (173ms).
>cd bin
>msbuild MyProject.sln /p:Configuration=Debug /p:Platform=x64
MSBuild のバージョン 17.14.10+8b8e13593 (.NET Framework)
2026/10/18 2:11:00 にビルドを開始しました。
ノード 1 上のプロジェクト "C:\Users\ohisa\premake\dbg0\bin\MyProject.sln" (既定のターゲット)。
ValidateSolutionConfiguration:
ソリューション構成 "Debug|x64" をビルドしています。
プロジェクト "C:\Users\ohisa\premake\dbg0\bin\MyProject.sln" (1) は、ノード 1 上に "C:\Users\ohisa\premake\dbg0\bin\MyApp.vcxproj" (
2) をビルドしています (既定のターゲット)。
PrepareForBuild:
Structured output is enabled. The formatting of compiler diagnostics will reflect the error hierarchy. See https://ak
a.ms/cpp/structured-output for more details.
InitializeBuildStatus:
"C:\Users\ohisa\premake\dbg0\bin\obj\x64\Debug\MyApp.tlog\unsuccessfulbuild" のタッチ タスクを実行しています。
ClCompile:
f:\Program Files\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\bin\HostX64\x64\CL.exe /c /ZI /JMC
/nologo /W3 /WX- /diagnostics:column /Od /D DEBUG /D _UNICODE /D UNICODE /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:w
char_t /Zc:forScope /Zc:inline /std:c++17 /Fo"C:\Users\ohisa\premake\dbg0\bin\obj\x64\Debug\\" /Fd"C:\Users\ohisa\pre
make\dbg0\bin\obj\x64\Debug\vc143.pdb" /external:W3 /Gd /TP /FC /errorReport:queue ..\src\main.cpp
main.cpp
Link:
f:\Program Files\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\bin\HostX64\x64\link.exe /ERRORREP
ORT:QUEUE /OUT:"C:\Users\ohisa\premake\dbg0\bin\Debug\MyApp.exe" /INCREMENTAL /ILK:"C:\Users\ohisa\premake\dbg0\bin\o
bj\x64\Debug\MyApp.ilk" /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /
manifest:embed /DEBUG /PDB:"C:\Users\ohisa\premake\dbg0\bin\Debug\MyApp.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE
/NXCOMPAT /IMPLIB:"C:\Users\ohisa\premake\dbg0\bin\Debug\MyApp.lib" /MACHINE:X64 C:\Users\ohisa\premake\dbg0\bin\obj
\x64\Debug\main.obj
MyApp.vcxproj -> C:\Users\ohisa\premake\dbg0\bin\Debug\MyApp.exe
FinalizeBuildStatus:
ファイル "C:\Users\ohisa\premake\dbg0\bin\obj\x64\Debug\MyApp.tlog\unsuccessfulbuild" を削除しています。
"C:\Users\ohisa\premake\dbg0\bin\obj\x64\Debug\MyApp.tlog\MyApp.lastbuildstate" のタッチ タスクを実行しています。
プロジェクト "C:\Users\ohisa\premake\dbg0\bin\MyApp.vcxproj" (既定のターゲット) のビルドが完了しました。
プロジェクト "C:\Users\ohisa\premake\dbg0\bin\MyProject.sln" (既定のターゲット) のビルドが完了しました。
ビルドに成功しました。
0 個の警告
0 エラー
経過時間 00:00:09.90
>cd debug
>windbg
premake5.lua
workspace "MyProject"
configurations { "Debug", "Release" }
platforms { "x64" }
location "bin"
project "MyApp"
kind "ConsoleApp"
language "C++"
cppdialect "C++17"
targetdir "bin/%{cfg.buildcfg}"
files { "src/**.h", "src/**.cpp" }
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
main.cpp
#include <iostream>
int main() {
for (int i = 1; i <= 100; ++i)
{
if (i % 3 == 0 && i % 5 == 0)
{
std::cout << "FizzBuzz\n";
}
else if (i % 3 == 0)
{
std::cout << "Fizz\n";
}
else if (i % 5 == 0)
{
std::cout << "Buzz\n";
}
else
{
std::cout << i << '\n';
}
__debugbreak();
}
return 0;
}
写真
windbgのgコマンドで変数iの値が1個進めば、成功です。

以上。