How to debug Statistica Visual basic code/macro ?

How to debug Statistica Visual basic code/macro ?

book

Article ID: KB0075052

calendar_today

Updated On: 06-30-2020

Products Versions
Spotfire Statistica 13.1 and higher

Description

How to debug Statistica Visual Basic(SVB) code/macro?

Use cases for debugging a macro or SVB node could be to try and understand the inner workings of the code/ to get hold of tha value the node takes when it runs / to fix a custom code issue.

Issue/Introduction

How to debug Statistica Visual Basic(SVB) code/macro?

Resolution

To start debugging a macro simply click on the left gray bar to set a break point on the line of interest and run the macro. In Context of SVB node, right click on the node and select Edit code and then set the break point.

In the SVB debug mode you may perform the below operations:

Step Into: Steps to the next line of code.If the code calls a procedure or function, the Step Into will step into the Subroutine/function.
Step Over: This will Step over Subroutines/Functions
Step Out: Will Step out of subroutines/Functions.
Run to Cursor: Will run to the second breakpoint that is set in the code.
Reset : Ends the Macro execution

In addition to these buttons, user may use the tabs to get further information

Immediate: Lets you run interactive SVB statements. Such as if you wanted to look at an intermediate Spreadsheet you could type in "[SpreadsheetObjectName].Visible=True
Watch: To watch the values objects/variable takes
Stack: To view the call stack of the macro
Loaded: Shows the libraries loaded



Attached gif has an illustration of debugging an SVB node and it uses the example workspace:  Open >>Open Examples>>Workspaces>> Example_SubsetbyMatch.sdm

 

Attachments

How to debug Statistica Visual basic code/macro ? get_app