Debug & Logging of Plug-In

Hi,

Is there any way to debug Plug-In execution?

I tried to attach to the process of the Trados, but nothing happened.

In addition - what is the best practice for logging in the Plug-In? Is there any unified log storage I should write to, or should I write my logs to a regular file?

Thanks,

Memi

Parents Reply Children
  • OK, thanks. That worked.

    It turns out the problem is that the Plug-In cannot access the app.config file of the Plug-In.
    How can that be done?

    In addition - I must admit I'm having some difficulties accessing the docs. ie, I couldn't find the full API docs of the Verification API, and couldn't locate the full technical specs of the OpenExchange format - what exactly can be published, how does Studio downloads and installs the Plug-In, and can I really run my own installer together with the downloaded Plug-In.
    Could you please point me to those resources?
  • Hi Memi,

    with reference only to the issue you are having with the app.config file, as follows:

    I am guessing from the previous responses that you receive an exception when you try to instantiate the web service or maybe a database whose connection settings are located in the app.config, correct?

    If this is the case, then one way to avoid this exception is by writing the binding information for connecting with the web service or database directly in the class as opposed to a dependency on recovering that data from the app.config file during run-time. It should be possible to recover various examples of this on the net.

    Patrick Andrew Hartnett | Developer Experience | Team Lead | RWS Group

  • Thanks Patrick,

    Yes, this is what I ended up doing, but I really don't like it.
    Isn't there any way of having a configuration file for the Plug-In that I can access?
    I found out that using ConfigurationManager gives me access to the Trados' config file, not to the Plug-In's one.
  • Hi Memi,

    It should also be possible to load the information from the config file, but only if you separate the concern by including the logic for connecting with your web service and/or database in a separate assembly. You would most likely install this assembly in the Studio installation directory with the config file (i.e. with the same name of the dll + .config).

    does this make sense?

    Patrick Andrew Hartnett | Developer Experience | Team Lead | RWS Group