Attching a proceee to a .NET DEbugger

S

Saradhi

I am trying to attach my process to the .NET Debugger to debug my process. and I am using the folliwng code.

if ( !(applicationObject.Debugger.DebuggedProcesses == null) )

{

int processId = ((ExtensibilityEngine)m_ExtensibilityEngine).ProcessID;

foreach(Process p1 in applicationObject.Debugger.DebuggedProcesses )

if ( p1.ProcessID == processId )

return;

foreach(Process p1 in applicationObject.Debugger.LocalProcesses)

if ( p1.ProcessID == processId)

{

// Attach the ExEngine Object to the VS.NET Debugger

p1.Attach();

return;

}

}

This code works well. But the problem is it is very slow. It is taking all the Debugging options such as CLR, Native, MS SQL, Script and hence it is very slow because Native debugging is always slow.

Is there any way that we can specify one or more of the 4 options individually?

-SARADHI
 
S

Saradhi

I am really dispoointed not to get answer from MS groups for such a long period.
I didnt understand why MS people is so calm about some things which they feel is a bug or dont have any answer.
Better if they agree their mistake and solve it in the later additions.

Keeping calm doesnt make any sense to me.
I am trying to attach my process to the .NET Debugger to debug my process. and I am using the folliwng code.

if ( !(applicationObject.Debugger.DebuggedProcesses == null) )

{

int processId = ((ExtensibilityEngine)m_ExtensibilityEngine).ProcessID;

foreach(Process p1 in applicationObject.Debugger.DebuggedProcesses )

if ( p1.ProcessID == processId )

return;

foreach(Process p1 in applicationObject.Debugger.LocalProcesses)

if ( p1.ProcessID == processId)

{

// Attach the ExEngine Object to the VS.NET Debugger

p1.Attach();

return;

}

}

This code works well. But the problem is it is very slow. It is taking all the Debugging options such as CLR, Native, MS SQL, Script and hence it is very slow because Native debugging is always slow.

Is there any way that we can specify one or more of the 4 options individually?

-SARADHI
 
S

Simon Smith

Are you a subscriber? Have you registered your posting id?

If not, MS probably won't even see your messages.

Simon Smith
simon dot s at ghytred dot com
www.ghytred.com/NewsLook - NNTP Client for Outlook
 
M

Morten Wennevik

Saradhi,

You posted a message 12 days ago, on a friday evening in Europe and afternoon in USA, this would severly limit the number of people checking the news group at that time. Due to the amount of posts in these groups they go 'out of date' fairly soon, and I for one rarely check posts older than 24 hours. So, if you don't get a response within a day, chances are people don't know your answer, or those that do didn't read it (they weren't around at the time, and don't check "old" posts).

If you don't get an answer within reasonable time, repost the question, or we might think that you solved it yourself.

Also, I prefer plain text posts over html ones, although I don't discriminate them.
Not to mention, this group, although created by Microsoft and hosted on one of their news servers, isn't run by Microsoft people. You won't get an answer from a Microsoft Official just because you post a question. You get answers from whatever people checking this group and perhaps knowing the answer. So if a person don't know the answer he won't say so either and pass the problem on to the next guy (or gal).

As to your question, I don't know of any Process.Attach() method so I can't say how it works.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top