I've created a Visual C++ Custom Wizard project for a custom Add\New
Project...
In the default.js file, I'm able to set compiler and linker flags, but don't
know how
to programmatically specify the application to be run when starting the
debugger.
I recorded a macro that launches the Property Pages dialog, selects the
Debugging
configuration property, then specifies an application for the Command entry,
but
the only thing that gets recorded is the launching of the Properties Pages.
The
application that I specify does not show up in the macro.
My guess is that I need to set the VCDebugSettings.ApplicationCommand
property to a string that specifies the application, but don't know the
magic JScript incantations. Does anyone here know how to do this?
Thanks,
Keith A. Lewis
Keith A. Lewis - 01 Aug 2007 21:09 GMT
> I've created a Visual C++ Custom Wizard project for a custom Add\New
> Project...
[quoted text clipped - 17 lines]
> Thanks,
> Keith A. Lewis
Figured it out. Below is the relevant portion of default.js. I set
the debug command to start Excel 2003 and give it some handy
arguments. It is possible to debug the script by inserting the
"debugger" keyword. The object browser does not indicate that
the DebugSettings property is available, but evidently it is.
function AddConfig(proj, strProjectName)
{
try
{
var config = proj.Object.Configurations('Debug');
config.IntermediateDirectory = 'Debug';
config.OutputDirectory = 'Debug';
config.CharacterSet = charSetMBCS;
// get full path to Excel
var shell = new ActiveXObject("WScript.Shell");
var root =
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Office\\11.0\\Excel\\InstallRoot\\Path";
var excel = shell.RegRead(root);
config.DebugSettings.Command = excel + '\\Excel.exe';
config.DebugSettings.CommandArguments = '"$(TargetPath)" /p
"$(ProjectDir)"';
...