Visual-studio – How to Debug a SingleFileGenerator/ Custom Tool

customtooldebuggingvisual-studio-2008

I am building a Custom Tool code generator using the Visual Studio SDK and basing it on the SingleFileGenerator example.

My question is how to enter debug mode on this code? I can currently add my custom tool to a file in Visual Studio but it errors out, I'd like to be able to debug this code if possible.

Best Answer

You need to debug Visual Studio, you can either do it by attaching to a running session (Tools\Attach To Process) or by setting Visual Studio (devenv.exe) to be your startup project of the Custom Tool Project.