4

I have a C# class library (which is an AutoCAD .net application) and a console application.

Somewhere in the class library, it starts the console application using Process.Start()

I have both of these projects with the same solution, I have set the class library as the startup project (to launch AutoCAD). I can debug the class library, but not the console application.

How can I debug the console application given this configuration?

1

1 Answer 1

1

You need to use the Debug->Attach To Process option in Visual Studio.

Sign up to request clarification or add additional context in comments.

2 Comments

Unfortunately this doesn't work for me because AutoCAD, which the class library code is running in already has the debugger attached, and I would have to somehow pause the console application in order to be able to attach the debugger to it. The only workaround I know of is to put Debugger.Break()
You don't need to pause the application to attach a debugger. If another debugger is already attached, you can still attach WinDbg in non-invasive mode and look at the process, but not control it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.