-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
[Feature request] Support breakpoints on cloud function emulators #165
Comments
|
Been busy with other work lately, will look at this asap, sounds great though |
This is a nice feature request. Some discussion topics on it: I would like to propose that further additions are needed before we could release this feature:
|
add my 5 cents here. The sourcemaps should be definitely deployed by default. Since code is bundled finding a real file causing an issue would be hard without sourcemaps. Default code generator should insert |
@thekip thanks for your comment. I broadly agree. |
@thekip
Doing a bit of research, it seems as though using node's
in our However, there's a very interesting discussion here indicating that the node implementation is extremely slow with larger sourcemap files (like the ones we'd get with esbuild bundles), which seems to add risk of performance penalties in production cloud functions - not ideal given that CPU time is billed. It does seem that performance costs for either node native or One contributor has benchmarked various source map solutions here, with node native support not faring too well in v16-v17, and also flagging incorrect stack traces which is not encouraging. There's no data in the benchmarks for v18+. Some of these concerns may be more related to how big or minified the source map files are however, so on a related note, this comment is interesting also - using an |
I think I'm going to proceed carefully with this feature, and:
This at least sets a foundation for debugging functions locally. We can then see what is the best way forward for supporting source maps in deployed functions. |
I added this in our project by doing the following:
"sourcemap": true
to the esbuildOptions.--inspect-functions
to the emulators:start commandSample
launch.json
The text was updated successfully, but these errors were encountered: