- ago
Is it possible to debug WL8 in Visual Studio, please?
0
1,250
Solved
10 Replies

Reply

Bookmark

Sort
- ago
#1
You'll be amazed at how many topics exist for Visual Studio debugging. Here's just the top posts I got by doing a quick forum search for "visual studio":

https://www.wealth-lab.com/Discussion/New-instruction-for-using-Visual-Studio-to-develop-and-debug-strategies-5494
https://www.wealth-lab.com/Discussion/Visual-Studio-2019-with-NET6-based-WL8-project-7806
https://www.wealth-lab.com/Discussion/Configuring-Visual-Studio-2022-output-7842

Clone our Wealth-Lab 8 Extension Demo project on GitHub to get a head start in developing your own Extensions.
https://github.com/LucidDion/WL8ExtensionDemos

Here's an API for building and debugging Strategies (the Strategy Library API):
https://www.wealth-lab.com/Support/ExtensionApi/StrategyLibrary
0
Best Answer
- ago
#2
Thanks Eugene,
Yes I've read all of these posts and tried to get debugging going using Visual Studio but the knowledge gap is too large for me to be successful. Ideally the WL interface would enable me to see the value of variables and how logic expressions evaluate.
I'll have another read and try again tomorrow.
0
- ago
#3
I think Microsoft may have changed Visual Studio since https://www.wealth-lab.com/Support/ExtensionApi/StrategyLibrary was written. That web link talks about setting the Startup executable for debugging; see screenshot below.



The problem is the Launch Profile doesn't include a place to enter an executable. It only includes a directory for one. So where to I specify the Startup executable in Visual Studio version 17.7.6? Did they move it? I'm trying to setup Edit and Continue in VS.
0
- ago
#4
QUOTE:
the Launch Profile doesn't include a place to enter an executable.


In Project Properties->Debug->General
click on "Open Debug Launch Profile UI"

Here you should click Create New Profile (of type executable). Then you can enter the WL executable:


1
- ago
#5
Okay, I configured a Startup executable as is shown below. Now when I run the VS debugger, it gives me the error at the bottom saying the startup executable is not configured? So what gives?


Pretend like I never done this before, and don't leave any steps out this time. Did I mention that I haven't done Edit and Continue before with this debugger? I'm from the embedded systems world, which doesn't use the Visual Studio IDE.
0
- ago
#6
Switch from "Release" to "Debug".
0
- ago
#7
Switching to Debug mode (for Project ScreenCard) doesn't help; see screenshot below.



So what now? Is there a simple URL that discusses how to setup an external executable as a Startup app?
0
- ago
#8
It looks like you're not using the new launch profile that you created. On the row where you selected Debug and AnyCPU, just to the right of those selections, change the launch profile from ScreenCard to Profile1, assuming that's the one you setup to point to the WealthLab8 executable.
2
- ago
#9
QUOTE:
... change the launch profile from ScreenCard to Profile1,...

I renamed Profile1 to exec WealthLab8 and made that change; see screenshot below. That fixed the problem. Thanks guys. Gee, the docs detailing on how to do this are really lacking.

0
- ago
#10
QUOTE:
Gee, the docs detailing on how to do this are really lacking.

The StrategyLibrary API document will soon get updated with the latest developments; I've already committed the changes.
2

Reply

Bookmark

Sort