computeCurrentScript() from d8 preamble fails in VS Code extension host (NodeJS) due to tabs instead of spaces for stack trace indenting #55684
Labels
area-web
Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop.
web-dart2js
I was trying to run some compiled Dart in a VS Code extension (which runs in a NodeJS process) using the d8 preamable file).
The
computeCurrentScript
function fails like this:I added some logging of the regex and the stack that was captured:
And the output looked like this:
Everything appeared good but after some more debugging I found that the stack trace here has tabs and not spaces!
If I change the start of the regex from
/^ *at
to/^\s*at
then the code works (or at least it gets further.. but I think the remaining issues are my own).I cannot figure out why the stack traces have tabs here, but it seems like changing the space to
\s
here would not be breaking so I'm hopeful that it is a change that could be made. I'm happy to open a CL if someone can confirm this is a valid change.The text was updated successfully, but these errors were encountered: