Feature Request: Ability to preview all outputs of a code block

When writing designscript, I often find myself creating large code blocks with many outputs. In order to properly debug my graph, I need to see what is happening to data as it flows through the code block, but the node preview only shows the last output.

I therefore propose this idea: Could there be a way to quickly mouse over each output of the code block and see the preview for just that output?

You may respond “Why don’t you just place a watch node for each output?”
Here is the result of such foolishness :upside_down_face::

As you can see, it is very difficult to read such a cluttered mess of watch nodes, and if you try to space them out so they can all be seen, they won’t fit on the screen, so you must keep scrolling back and forth to read the results. Often I will delete all the watch nodes because they are in the way, but later I will realize I need to go back and debug the code, so I have to place them all again. Does anyone else have this problem?

So again, the solution I’m proposing would be something along the lines of an ability to mouse over each output and show a separate preview window for each output. You could probably only show a preview for one output at a time, but that would still be helpful. This would allow the user to quickly glance at all the outputs and see if data is flowing correctly, but when the preview is hidden, it no longer clutters the graph.

I suppose I should tag @solamour
Thanks Dynamo team!

5 Likes

Oh how I want this…

Sol is on a well deserved vacation this week, so I’ll step up - not saying that my desire for this is a favor here, but I really, really, really want this. So…

Looks like a great thing to add to the Dynamo Wishlist, which is hosted on the same GitHub used by the development team daily. Makes it super easy to get eyes on the features you want and need. I’ll try and get it added later tonight. :slight_smile:

If you have other ideas in the future (or if you can beat me to it - I need to get and eat dinner first), post away: GitHub - DynamoDS/DynamoWishlist: This is a repository for all wishlist items for Dynamo Core

4 Likes

Same! Thanks for posting @Frank_Loftus.

2 Likes

Great idea! To go one step further I’ve often felt a ‘preview next/previous row’ toggle would be useful for this, that way you can ‘follow’ the journey of data visually through the code block.

3 Likes

I think the way I visualized it was almost like the content of a dictionary… each output has a name now (pulled from the variable name), which could be serialized to the output value, using a OUTPUT[i] where not defined… maybe I’ll mark it up before putting the wish together…

1 Like

Suggestions here improve on an existing Wishlist topic

CodeBlock result preview: Show results of all valid lines of code · Issue #177 · DynamoDS/DynamoWishlist (github.com)

1 Like

As a work around until there is a better solution you can reduce the watch nodes by combining them into a list:

It is not optimal but hey, that is why it is called “work around” :slight_smile:

3 Likes

@JacobSmall Yeah, great idea. Just show all the variables like a dictionary output in the preview window. That way you can scroll through all the outputs at once. Everybody forget my idea.

@Anton_Huizinga that’s a decent work around. Thanks!

I’ve created a markup and posted to the existing issue on Github:

https://github.com/DynamoDS/DynamoWishlist/issues/177

It seems like utilizing the line numbers somehow could reduce ambiguity. Here’s what it looks like in v2.12.

Lines

Using the naming convention of OUTPUT[n], a few questions arise:

  • Does that mean that it is the nth output as read from top to bottom?
  • Is the first output OUTPUT[0] (similar to IN[0] for a Python node) or is it OUTPUT[1]?
  • In the above screenshot, would it be OUTPUT[3] because it’s the third output port or OUTPUT[5] because it’s on line 5?

If you had a large code block with a ton of output ports, it would be pretty tedious to count and figure out which output number you were looking for. Identifying the output by it’s line number might help because it provides a visual way to quickly locate it. Not sure how you would show the line number in the output, but maybe it could look similar to how a list output looks with the gray shaded boxes?

2021-10-27_10h47_19

1 Like

All good points @mzjensen.

Showing the corresponding line numbers is a good idea. I suppose it is most logical to use the index of the output to label undefined variables (so it would show as OUTPUT[3] in my example above).

I would t go that far… but you might want to look into Dynamo 2.13 in the daily builds (Sandbox only). New features around identifying the data moving along a wire are underway which might make the per ‘output’ preview somewhat already under way. :slight_smile: