How to manually run scripts and rules created in VS Code

I’m trying to start using VS to write rules and scripts.

Should I be seeing rules that I create in text files appearing in the Main UI? The docs say that thing and items do, but doesn’t mention the rules and scripts.

Which leads to my next question; How can I manually run these text rules and scripts? When testing and building etc.

Yes, assuming you are talking about OH 3.

In MainUI there is a play button on each rule’s page that will trigger the rule to run. However, many rules expect to be triggered by an Item event. When you manually trigger the rule you won’t have the Item event nor any of the implicit variables that are created when a rule is triggered by an Item event (e.g. triggeringItem, previousState, receviedCommand). There will be many cases where your Rule will depend on these in which case to trigger the rule you need to issue a command or an update to one of the Items that trigger the rule.