473,405 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Attaching debugger in a macro

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.
Nov 20 '05 #1
2 2420
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:vm******************************@40tude.net.. .
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.

Nov 20 '05 #2
What version of Visual Studio are you using? It sounds like you're using a
version that doesn't have the native debugging engine. In Visual Studio
2002/2003, the Process.Attach() call will attach with the "Native" debug
engine if there's only native code running. If there's managed code, it will
attach in interop mode.

HabibH.

"Chris Dunaway" <dunawayc@_lunchmeat_sbcglobal.net> wrote in message
news:vm******************************@40tude.net.. .
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.

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Andrew Taranov | last post by:
Hi! I've got a problem attaching the Script Debugger to ASP pages under IIS6. Set up everything following IIS6 documentation: turned on ASP debug in IIS Manager; edited permissions for Machine...
0
by: Saradhi | last post by:
Here I am back with the same question again. I am trying to attach my process to the .NET Debugger to debug my process. and I am using the folliwng code. if (...
1
by: Mark Kamoski | last post by:
Hi-- All of sudden (?) the VS.NET v1 IDE is NOT automatically attaching aspnet_wp.exe as a debugged process. Why? Here is the situation. VS.NET (v1)
0
by: Jim Heavey | last post by:
Hello, I'm having a problem with running the Debugger on Windows 2000 Pro workstation. The help says that there are version of windows in which the debugger is not automatically attached, but it...
0
by: Chris Dunaway | last post by:
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...
1
by: DaveF | last post by:
Any Ideas? Attaching the .net debugger to process ' winformhello.exe' on machine 'PC50781' failed. Error code 0x80040001. -- Dave
0
by: elziko | last post by:
When I used Framework 1.0, if I had any problems once I had copied my application onto a target machine and it had problems I would copy a load of JIT files into the directory (including...
0
by: larsliden | last post by:
Anyone have an idea how to write a Macro for attaching to a process in Visual Studio? The Macro recorder doesn't work and I haven't been able to build one by hand. Thanks for your thoughts!
4
by: alf | last post by:
Hi, I have a two fold question: -how to attach the debugger to running multi threaded program -the objective is to find an infinite loop in one of threads which makes the whole thingy going...
3
by: =?Utf-8?B?UGhpbCBKb2huc29u?= | last post by:
I am using VS2003 to create a C# dll that uses shell namespace extensions. I need to debug my code but it is running in the explorer.exe process and when I open my namespace extension from My...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.