VL - Debug Layer

This is a one of those big ‘dream’ feature requests.
It covers functionality that I’m sure the devvvs and other users are already thinking about.
This is my humble opinion on how something like this could work.

THE PROBLEM:
I think VL can be a really beautiful and functional way of describing logic.

As an example here’s a nice clean beautiful patch of a final program:

However it doesn’t always look like that during development.
When I’m debugging the patch and still building components and checking values it looks something more like this:

Because of the debug elements It’s overall a less clean description of what the program is made to do. Certainly harder for a third party to read.

Other small problems:
After I clean up debug functionality to get a beautiful patch I may have to bring it back again later to test something else.
All those little debug parts are using ( a small) amount of resources. This is often minor but it makes it hard to profile the component properly during development.

It would be great if I could isolate the debug parts of the patch and turn them on and off…

THE SOLUTION:

A DEBUG LAYER.
If your regular patch is a circuit board than the debug layer is like jumper wires.

-The debug layer can be turned on and off at will, disappearing when not in use to leave a nice clean patch.
-I propose that the debug layer would run in the same pass as the GUI. You know how you can see values when you hover over a pin with the mouse? That’s the level the debug layer would work on, with access to everything the VL GUI can access.

  • You would be able to switch on and off the debug operations per instance or globally so you can prevent debug operations you don’t need using CPU cycles.

Here’s a basic sketch of what that could look like:

-Items on the debug layer can connect to regular pins but ALSO to links.
-When connected to links you can use a special JUNCTION widget.
–INSERT JUNCTION - replace the value of a link while the DEBUG ACTIVE input is true.
–BREAKPOINT JUNCTION- pulls a value out of a link with selectable slice.
-If a JUNCTION is in a loop (that’s within a loop, that’s within a loop) you get slice selection pins for each loop.
-Possibly you can also choose to concatenate a spread of results from all loops. Or insert in every loop etc.

-Using the INSTANCE NAVIGATOR dropdown you can choose which instance of a component you want to debug.
(Possibly the ability to name instances would help make this clear on complicated projects)
There is an option to debug the instance you last navigated to.

FURTHER IDEA:
You could build UNIT TEST layers in the same manner as the DEBUG layers.
This way you can set and check test values on all inputs of a given component from within the component itself.
‘Run all tests’ and you can quickly see if you’ve broken any of your components since the last test.

3 Likes

While I’m dreaming I’d also love a log message / TTY / print / console type feature to be included with the debug tools…

And then if we could get at that console output elsewhere could eg upload log to web server.

1 Like

hei toby,

all good points and ideas. i linked it with our internal issues on that topic. so we’ll get back to this when we’re on it…

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.