سؤال

We created a C# project in Visual Studio, That results a DLL file. If we import that DLL file to 3rd party application it acts as a plugin. Everything is fine. But there is a bug in my DLL file which I can find it by placing a debug point. But I don't know how can I do that for DLL which is imported to 3rd party application.

هل كانت مفيدة؟

المحلول 2

It might or might not work, but you can attach to a running process:

enter image description here

enter image description here

نصائح أخرى

Go to the Debug tab in Project Properties, set the Start Action to Launch External Process, then select the 3rd-party EXE.

enter image description here

Possibilities:

  • System.Diagnostics.Debug.Write() may cover your case, if the 3rd party application is being run in Debug mode - you'll see the content at the Output window.
  • You may detect if your component is running under Visual Studio, even when hosted by another application, by checking System.Diagnostics.Debugger.IsAttached. If that's the case, you may dump debug information to a local file.

You can try to implement some unit tests in your project to narrow down the problem.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top