winglang/wing

--debug flag should show full SDK stack traces inflight

Open

#5,883 opened on Mar 11, 2024

View on GitHub
 (20 comments) (0 reactions) (1 assignee)TypeScript (214 forks)github user discovery
good first issue🎨 sdk🐛 bug

Repository metrics

Stars
 (5,385 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

I tried this:

I ran wing test main.w with this code:

bring cloud;

let b = new cloud.Bucket();

test "call extern code" {
  b.get("invalid-key");
}

This happened:

I get an error as expected:

fail ┌ main.wsim » root/env0/test:call extern code
     │ Error: Object does not exist (key=invalid-key): Error: ENOENT: no such file or directory, open 'target/test/main.wsim/.state/c8962f0cd81d488253a50c5fab66f85708ed7b9545/files/8360c1a8d75639359aa1a0ebb0deb102'
     │   --> main.w:7:3
     │   | let b = new cloud.Bucket();
     │   | 
     │   | test "call extern code" {
     │ 7 |   b.get("invalid-key");
     │   |   ^
     └ at /Users/chrisr/dev/wing-test/main.w:7:3

But if I'm trying to debug something internal to Wing SDK, I'd like to see all JavaScript code instead of seeing the stack trace stop at "b.get()".

I expected this:

Passing --debug flag should show an unfiltered (or at least, less-filtered) stack trace

Is there a workaround?

No response

Anything else?

No response

Wing Version

0.59.45

Node.js Version

20.9.0

Platform(s)

MacOS

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.

Contributor guide