Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support source map resolution in stack traces #448

Open
georgejecook opened this issue Nov 9, 2022 · 1 comment
Open

support source map resolution in stack traces #448

georgejecook opened this issue Nov 9, 2022 · 1 comment

Comments

@georgejecook
Copy link
Contributor

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.

@TwitchBronBron
Copy link
Member

I agree, this would be really nice. This should realistically happen in roku-debug, right when we receive the log output, because roku-debug is the one that has rewritten the component library filenames, injected breakpoints (which offset line numbers), etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants