Overview

Welcome to the January 2023 edition of “What’s New in RokuCommunity.” Please consider subscribing to stay up to date with what’s happening in RokuCommunity.

This month we made some great improvements to the debugging experience, such as support for executing complex expressions in the REPL and watch panels, fixing that frustrating infinite spin issue in the variables panel, and some nice new features in SceneGraph Inspector.

When editing your projects, you will now see a new diagnostic whenever you use more than the max callfunc arguments, and we’ve improved syntax highlighting for the continue for and continue while keywords.

We also made a few non-user-facing changes to help RokuCommunity contributors work on the projects.

Debugging

Allow relative RALE tracker task path

The RALE tracker task path can now be a relative path, and supports replacement variables like ${workspaceFolder} image

Execute complex REPL expressions in the Run & Debug panel

Now the Watch section of the Run & Debug panel supports complex REPL expressions when using Roku’s new debug protocol. This means you can now execute expressions like doSomething() or "alpha" + chr(3).

image

Note that this already worked when using telnet, and is now functional when you have the Debug Protocol enabled.

image

Fix infinite spin for unloaded vars

Fix a bug where the UI would spin forever when trying to load variables that no longer exist, and would then cause the rest of the debug session to become unresponsive. Now we show a useful error message instead.

Before: image

After: image

Hide certain prefixed variables in the Debug panel

Our debug adapters currently create variables like vscodeLoopKey, vscodeLoopItem, etc. These variables show up in the Local variables panel after the first step. We have established the prefix __rokudebug__ for tool-generated variables and we will now filter variables that start with this prefix so they don’t show in the the various Debug panels.

If for some reason you need to see these variables, you can set "showHiddenVariables": true in your launch.json.

Fix off-by-1 bug with threads over protocol

We fixed a bug in the Debug Protocol where the wrong line numbers were being reported for the threads response. We had incorrectly assumed that the protocol reported 0-based line numbers, when in fact they are 1-based. This was largly not evident to the user because we had a few workarounds in place, but now we can directly trust the values coming from the device.

Increased the timeout for debug protocol control

For larger apps it takes longer than 5 seconds to finish parsing and compiling the app, which would cause the debug protocol to time out and terminate the debug session. In the short term we just doubled our internal timeout to 10 seconds, but ideally this would be configurable so that may eventually be implemented in a future release.

SceneGraph Inspector improvements

The SceneGraph Inspector has been enhanced with a new keypath syntax which should make it much easier to identify a specific node in the scene at a point in time. This is powered by some better keypath logic in RDB. You can see the new keyPath field in the screenshot below:

image

We’ve also improved the reliability of the focus scrolling.

BrighterScript

New diagnostic for max callfunc arguments

An undocumented limitation of SceneGraph’s callfunc functionality is that you cannot pass more than 5 arguments. Doing so would cause the call to silently fail, and sometimes even crash the application. BrighterScript#765 adds a diagnostic to flag these types of calls so you can detect them at compile time instead of at runtime.

image

Syntax highlighting for continue for and continue while

Syntax highlighting for the new continue while and continue for keywords was fixed in v2.38.7

Before:

image

After:

image

We want to make sure changes to BrighterScript don’t break the main projects that depend on it. For a while now, our script to test the related RokuCommunity projects had problems with certain repositories that found ancestors inside node_modules. To fix that, now we use the system tempdir instead of a local .tmp folder.

We have also started running the test suites from the rooibos and maestro-roku-bsc-plugin projects.

Misc

Improved extension development experience

Historically, you’d need to manually launch watcher tasks for each RokuCommunity project that you were actively working on. As of vscode-brightscript-language#456, we automatically find all RokuCommunity repositories cloned at the same level as vscode-brightscript-language, and launch a combined watcher task for all of them. This greatly simplifies the development experience, reducing confusion for community contributors.

Fix Github action that creates .vsix files on PR changes

If you are a contributor to the roku-debug repository, you might have notice that we have a commenter bot that creates .vsix files for you on each PR update.

image

The link to the instalation instructions was broken. Now we have updated it to open the correct page in our new website: rokucommunity.github.io.

Thank you

Last but certainly not least, a big Thank You to the following people who contributed this month:

Contributions to vscode-brightscript-language:

Contributions to brighterscript:

Contributions to logger:

Contributions to roku-debug:

Contributions to bslint:

Contributions to roku-report-analyzer:

Home What's new Slack channel Newsletter Edit this website on Github

Legal notice

The views and opinions expressed in this website and all of its pages are those from within our open source community and do not represent the views or positions of Roku, Inc. or any entities they represent.

Designed with favorite by @arturocuya, powered by Astro