Re: how to debug a dll containing a com object instantiated by a jscript called from a batch file




> > You should use cscript.exe as the Command,
> > and specify the .js file in the Command Arguments.
>
> Thank you, you're right but my problem is that the jscript is called
> from a quite complicated batch file (not as simple as I posted before)
> and I was wondering if it is possible to trigger the debugger with the
> batch.
>
> Otherwise I have to separate the js from the batch...
>

You can try the approach described here (the target executable is still cscript.exe):
http://msdn.microsoft.com/library/en-us/vsdebug/html/vxtskLaunchingDebuggerAutomatically.asp

After configuring the Registry setting, run the batch as usual, and the debugger
should start automatically when cscript is launched. Then you can set breakpoints
and let cscript continue by F5. I prefer to specify the full path to devenv.exe in
the Debugger setting, and keep the path as short as possible (e.g. use short folder
names, or 'subst'); with long paths it sometimes does not work reliably.

Oleg






.



Relevant Pages


Loading