How to debug custom provider extension?
Author: jheffez
Creation Date: 8/9/2020 7:24 AM
profile picture

jheffez

#1
Using the template Google provider downloaded from the site I am attempting to create a custom one via VS2019 and have a few questions:

. When debugging (F5) it launches WLD. WLD detects that an updated extension is installed in the program folder and pops the extension screen prompting to install it. When I do that I have to restart WLD. At that point the debug connection between VS and WLD is broken. After installing the new provider > restarting WLD > closing WLD and pressing F5 again WLD comes up without the extension install popup but it never reaches the breakpoint set in Initialize(IDataHost dataHost). How can I debug?


. If I change the assembly: ExtensionInfo strings info in the EM_goog.cs it won't pop up the extension install/update window. Changing the "Descriptive Method Overrides" in GoogleProviderV2.cs does not make a change.

profile picture

Eugene

#2
QUOTE:
. When debugging (F5) it launches WLD. WLD detects that an updated extension is installed in the program folder and pops the extension screen prompting to install it. When I do that I have to restart WLD. At that point the debug connection between VS and WLD is broken. How can I debug?

First off, I doubt it's the Google provider which is already decommissioned and (probably) cannot trigger the EM prompt. Anyway, you can disable "Check for extension updates at startup" as instructed in the Extension Manager how-to. And even without doing that you can skip update (not required). But of course you can update extensions and forget about the EM popup for another month - our Extensions release cycle.

QUOTE:
. If I change the assembly: ExtensionInfo strings info in the EM_goog.cs it won't pop up the extension install/update window.

Feel free to remove this class with the ExtensionInfo attribute altogether, it's not required for debugging - only for publishing an Extension on wealth-lab.com.

QUOTE:
. How does VS2019 knows to launch WLD.exe? In the project properties startup object is not set.

On Project properties > Debug tab, choose "Start external program" and point to WealthLabDev.exe:
profile picture

Eugene

#3
QUOTE:
After installing the new provider > restarting WLD > closing WLD and pressing F5 again WLD comes up without the extension install popup but it never reaches the breakpoint set in Initialize(IDataHost dataHost). How can I debug?

1. You might have chosen an unsuitable .NET target platform. Set it to .NET 4.6.2 for certainty.

2. Check the output file location. It must be c:\Program Files\MS123 LLC\Wealth-Lab Developer 6.

3. Sometimes, breakpoints fail to trigger in VS because the source code and assembly (PDB file) are out of sync, PC clock is incorrect, you attached to the wrong process.

Double check everything, most likely it's not a WL issue at all.
profile picture

jheffez

#4
I managed to get the debugger to work. Thank you for the detailed info!

I noticed that the demo google provider is not working. Clicking on update/get data kicks with the attached screenshot (I would like to model it as an example). The project is set with .NET 4.62.
profile picture

Eugene

#5
I wonder what caused the problem?

QUOTE:
I noticed that the demo google provider is not working.

Which is perfectly expected. The old endpoint of Google Finance is decommissioned, trying to get the response stream throws a handled exception.

Glad to have helped.
profile picture

jheffez

#6
You are amazing! :)

Do you happen to have another provider demo I can use?

Also, does WLD stores/caches the retrieved data on the local disk or is this something I need to take care of?
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).