PC Review


Reply
Thread Tools Rate Thread

Attach to executed process through code

 
 
Samuel R. Neff
Guest
Posts: n/a
 
      24th Apr 2007
How can I attach the active debugger to a newly launched process?

For example, what goes in the if statement in the following code:


Process process = new Process();
process.StartInfo.FileName = path;
process.StartInfo.WorkingDirectory = Path.GetDirectoryName(path);
process.StartInfo.RedirectStandardInput = true;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.UseShellExecute = false;
process.Start();

if (Debugger.IsAttached)
{
// How do I attach?
}


Thanks,

Sam


------------------------------------------------------------
We're hiring! B-Line Medical is seeking .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
When that code is executed Marc R. Microsoft VB .NET 4 5th Feb 2008 08:55 AM
ORIGINAL CODE GETS EXECUTED NOT THE NEW CODE - ASCX sk Microsoft ASP .NET 1 19th Apr 2006 12:50 PM
Problem crating file and executed other process =?Utf-8?B?SnVhbiBDYXJsb3MgUw==?= Microsoft VB .NET 1 29th Apr 2005 11:09 PM
Get child process executed by parent process Niels van de Coevering via .NET 247 Microsoft Dot NET 0 9th Aug 2004 04:52 PM
Get child process executed by parent process Niels van de Coevering via .NET 247 Microsoft Dot NET 0 9th Aug 2004 04:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:47 PM.