rokucommunity / rokucommunity/vscode-brightscript-language

support source map resolution in stack traces

Open
#448 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement roku-debug
Dominant language
TypeScript
Stars
132
Forks
60
Avg merge
13h 53m
Merged PRs (30d)
20

Description

given a printed stack trace like:

AA({"backtrace":[{"filename":"pkg:/components/maestro/generated/ContentApiTask.brs","function":"exec() As Dynamic","line_number":24},{"filename":"pkg:/source/content-api/tasks/ContentApiTask.brs","function":"$anon_4d2(args As Dynamic) As Dynamic","line_number":48},{"filename":"pkg:/source/content-api/tasks/ContentApiTask.brs","function":"$anon_4d6() As Dynamic","line_number":123},{"filename":"pkg:/source/content-api/service/ContentApiParser.brs","function":"$anon_4b8(json As Dynamic, cardtype As Dynamic, moduletype As Dynamic) As Dynamic","line_number":210},{"filename":"pkg:/source/content-api/service/ContentApiParser.brs","function":"$anon_4b9(json As Dynamic, cardtype As Dynamic, moduletype As Dynamic) As Dynamic","line_number":256},{"filename":"pkg:/source/content-api/service/ContentApiParser.brs","function":"$anon_4bb(json As Dynamic, cardtype As Dynamic) As Dynamic","line_number":296},{"filename":"pkg:/source/content-api/service/ContentApiParser.brs(NaN)","function":"$anon_4bc(json As Dynamic, cardtype As Dynamic) As Dynamic","line_number":324}],"message":"'Dot' Operator attempted with invalid BrightScript Component or interface reference.","number":236,"rethrown":false})  

the Brightscript Log should convert this into a more consumable format, at very least linking to the correct .bs lines.. presently we have to go into the build folder and look these up.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the BrightScript Log handling and stack-trace parsing entry points in the extension. Use the sample backtrace from the issue to trace how generated and source paths are currently handled. Done means printed stack traces resolve to the corresponding .bs source lines and provide usable links from the log.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.