Solved

How to attach VS debugger with Process.Start

Posted on 2008-10-28
1
922 Views
Last Modified: 2012-05-05
My scenario is I am building an xUnit.NET Runner to work without Resharper or TestDriven.NET.

To do this I am using Process.Start as below:

            Process process = new Process();
            process.StartInfo.UseShellExecute = false;
            process.StartInfo.RedirectStandardOutput = true;
            process.StartInfo.RedirectStandardError = true;
            process.StartInfo.CreateNoWindow = true;
            process.StartInfo.FileName = "xunit.console.exe";
            process.StartInfo.Arguments = dllName;
            process.d
            process.Start();

            string output = process.StandardOutput.ReadToEnd();
            return output;

I want to be able to attach the Visual Studio debugger to my DLL. The DLL project is already a reference in the solution. How do I do this?

0
Comment
Question by:craigdev
1 Comment
 
LVL 10

Accepted Solution

by:
jinn_hnnl earned 500 total points
ID: 22820370
Have you try:
System.Diagnostics.Debugger.Break(); ?

If the DLL project has refered to the current, it should jump in, shouldn't it?

JINN
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question