Login Page - Create Account

Support Board


Date/Time: Mon, 21 Apr 2025 18:22:35 +0000



Post From: How to Use Visual Studio 2022 Community to Develop Custom Studies for Sierra Chart

[2025-02-24 17:05:50]
ondafringe - Posts: 322
Okay, you aren't going to believe how easy it is to create a debug version of your study.

But first, when you created your custom study project, you created a new, empty .cpp file that resides
in the project folder. If you are moving a previous custom study over to VS, you COPY the contents of
the original .cpp file and PASTE it into the new .cpp file that resides in your project folder, so you
are no longer working with the original .cpp file.
That file is history! Review the updated project
creation instructions in the beginning of the guide.

@Deiter You were close on some of it. :)

How to Start Debugging your Study

With your project open and with SC open and running:

At the top of VS:

Change "Release" to "Debug" and rebuild your Solution. (This is why you had to repeat the configuration steps for both Release and Debug)

SC has now created a debug version of your study.

Now go to SC and remove, apply, and re-add the study to your chart.

Click the Debug menu and click Attach to Process

Scroll down and find the Sierra Chart process.

Click on that process and click Attach

You should see some diagnostic stuff open in VS.

You can now set break points and start debugging.

When you are finished debugging, there is a red square at the top of VS.

Click that red square to detach from the SC process and stop debugging.

Remember, SC is still running the debug version of your study, so if you need to, change "Debug" back to "Release" and rebuild.

If/When you do rebuild a Release version, again, go to SC and remove, apply, and re-add the study to your chart.

However, while working on a custom study, you would typically work with the Debug version until you are finished and ready to roll, and then build a Release version.

The next time you want to debug, you shouldn't have to manually attach to the SC process again. Under the Debug menu, you should now be able to just click on "Reattach to Sierra Chart..." and it's done.

If that was all clear as mud, let me know and I will try to clean it up a bit.
Date Time Of Last Edit: 2025-03-06 15:17:01