Unfortunitely, you can't. The automation support for attach in VS.NET 2002
and 2003 was very limited. It didn't let you specify what kind of code that
you want to debug. Instead, it required debugging all the code in the
process. However, it sounds like you have VB.NET, which doesn't support
debugging unmanaged code. You need to either use full VS, or you need to
attach via the processes dialog.
Sorry,
--
Gregg
This posting is provided "AS IS", with no warranties, and confers no rights.
"Chris Dunaway" <dunawayc@_lunchmeat_sbcglobal.net> wrote in message
news:vm1l2fm1172a$.1pjntkhipluer$.(E-Mail Removed)...
> I am using the following code in a macro to attach to a process:
>
> Dim sFilename As String = "progname.exe"
> Dim proc As EnvDTE.Process
> For Each proc In DTE.Debugger.LocalProcesses
> If (Right(proc.Name, sFilename.Length) = sFilename) Then
> proc.Attach()
> attached = True
> Exit For
> End If
> Next
>
> Progname.exe is a VB.Net program compiled in Debug mode.
>
> When it runs, I get an error message that says: "Unmanaged Debugging Not
> Available"
>
> How do I attach to a managed program using a macro?
>
>
> --
> Chris
>
> To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
> address.
|