Using the SourceMapper
fails with Should be able to convert to usize: TryFromIntError(())
#6206
Replies: 4 comments 31 replies
-
Did you use
? This is very bad for debugging. I prefer unit testing & debugging via |
Beta Was this translation helpful? Give feedback.
-
In case you would have more pointers on fixing/debugging I am also wondering how a minimal setup to reproduce the issue could look like. Maybe without the NodeJs part to reduce the complexity. Wouldn't the |
Beta Was this translation helpful? Give feedback.
-
By removing some of the transformation steps in my plugin I was able to get rid of the |
Beta Was this translation helpful? Give feedback.
-
The following seems to be sufficient to reproduce the problem:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I now have a SWC plugin ready for testing 🎉 and are facing some problems 💥.
Question(s) 1: What are general best practices for debugging SWC plugins? For example, how to get to meaningful stack traces? Which debugger to use? Is it possible to debug into the code from a NodeJS environment?
Question 2: I am facing a concrete failure in
swc_plugin_runnter-0.77.4/src/memory_interop.rs:37.10
when running the plugin from a NodeJs environment. Any ideas?:Beta Was this translation helpful? Give feedback.
All reactions