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

Better debugging output #128

Open
lionel-rowe opened this issue Jul 20, 2023 · 1 comment
Open

Better debugging output #128

lionel-rowe opened this issue Jul 20, 2023 · 1 comment

Comments

@lionel-rowe
Copy link

Currently, thrown errors usually give very little information about what's gone wrong. Most errors look like this:

error: Uncaught (in promise) Error: Unable to output during bundling.
      const ret = new Error(getStringFromWasm0(arg0, arg1));
      # ...stack trace of WASM output/JS glue code

That could be any of the following situations:

  • Entry point doesn't exist
  • An imported module doesn't exist
  • Syntax error in any imported file
  • An imported module relies on an import map that hasn't been passed to bundle
  • Probably any number of other situations

Is there any way this debugging info could be provided? Or at least a stack trace that gives the file name/line number where the problem occurs within the bundled modules, rather than in the WASM output/JS glue code.

@yacinehmito
Copy link
Contributor

I agree, this is a real problem. I am currently stuck on a dependency that deno_emit doesn't want to bundle and I have no idea where to start. 😞

Unfortunately my knowledge of Wasm and Rust is too limited to be helpful. @dsherret Would you be able to provide some pointers on how to make this better?

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

No branches or pull requests

2 participants