# Debugging plugins: how can I generate sourcemaps for a plugin?

**URL:** <https://discuss.elastic.co/t/debugging-plugins-how-can-i-generate-sourcemaps-for-a-plugin/358573>\
**Category:** Kibana\
**Created:** [May 1, 2024, 3:40pm UTC](https://discuss.elastic.co/t/debugging-plugins-how-can-i-generate-sourcemaps-for-a-plugin/358573 "2024-05-01T15:40:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rcw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rcw/32/132214_2.png) [@rcw](https://discuss.elastic.co/u/rcw)\
**Post date:** [May 1, 2024, 3:40pm UTC](https://discuss.elastic.co/t/debugging-plugins-how-can-i-generate-sourcemaps-for-a-plugin/358573/1 "2024-05-01T15:40:15Z")

</div>

I have a plugin (targeting Kibana v8.13.2). I am seeing an ambiguous error when using the plugin, but it only seems to be happening in production. I would like to generate javascript source maps alongside the plugin when it is built (I am using `yarn build` to build for production). How can I do this? I looked through the tasks in `kbn-plugin-helpers` but can't see any obvious options.
