# Custom Modeler plugin, debugging

**URL:** <https://forum.bpmn.io/t/custom-modeler-plugin-debugging/7021>\
**Category:** Modeler\
**Created:** [December 10, 2021, 11:47am UTC](https://forum.bpmn.io/t/custom-modeler-plugin-debugging/7021 "2021-12-10T11:47:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![luk3tt0](https://forum.bpmn.io/user_avatar/forum.bpmn.io/luk3tt0/32/3277_2.png) [@luk3tt0](https://forum.bpmn.io/u/luk3tt0)\
**Post date:** [December 10, 2021, 11:47am UTC](https://forum.bpmn.io/t/custom-modeler-plugin-debugging/7021/1 "2021-12-10T11:47:48Z")

</div>

Hi all, I created my first Camunda Modeler Plugin starting by official **menu-plugin-example**.

Unfortunately I don’t know electron very well. I would like to understand what is the way to debug my sorce code.

I opened (F12) developer tool but my source file not showed

I inserted a simple console.log() in the click event but it is not printed into console.

Is there a step by step guide / tutorial for beginner developers?

Please help me

---

<div class="post-metadata">

**Author:** ![davidgs](https://forum.bpmn.io/user_avatar/forum.bpmn.io/davidgs/32/2270_2.png) [@davidgs](https://forum.bpmn.io/u/davidgs)\
**Post date:** [December 10, 2021, 2:00pm UTC](https://forum.bpmn.io/t/custom-modeler-plugin-debugging/7021/2 "2021-12-10T14:00:59Z")

</div>

Hi @luk3tt0 ,

Welcome to the community and congrats on your first plugin! Unfortunately, there really isn’t much documentation on this, and no tutorials that I’m aware of for debugging. That being said, I’ve just spent some time learning this myself, so maybe I can help out.

This is how I got to the sources for my plugin to do step-by-step debugging:

![Screen Shot 2021-12-10 at 8.59.16 AM](https://forum.bpmn.io/uploads/default/original/2X/4/4b81481632658e6f31510fcb210f8ed373a9c4c2.png)

If you’re not seeing your plugin here, you may not actually be loading it correctly. Can you share your `index.js` file so we can see how it’s being loaded?

Best Regards,  
dg

---

<div class="post-metadata">

**Author:** ![luk3tt0](https://forum.bpmn.io/user_avatar/forum.bpmn.io/luk3tt0/32/3277_2.png) [@luk3tt0](https://forum.bpmn.io/u/luk3tt0)\
**Post date:** [December 10, 2021, 3:05pm UTC](https://forum.bpmn.io/t/custom-modeler-plugin-debugging/7021/3 "2021-12-10T15:05:34Z")

</div>

> [@davidgs](#):
>
> If you’re not seeing your plugin here, you may not actually be loading it correctly. Can you share your `index.js` file so we can see how it’s being loaded?

started from menu-plugin…

```auto
'use strict';

module.exports = {
    name: 'MGDLab Plugin Example',
    menu: './menu/menu.js',
    script: './client/client.bundle.js'
};

```

menu.js

```auto
'use strict';

module.exports = function(electronApp, menuState) {
    return [{
        label: 'Hello World',
        enabled: function() {
            return true;
        },
        action: function() {

            const { dialog } = require('electron')

            const options = {
                type: 'question',
                buttons: ['Cancel', 'Yes, please', 'No, thanks'],
                defaultId: 2,
                title: 'Question',
                message: 'Do you want to do this?',
                detail: 'It does not really matter',
                checkboxLabel: 'Remember my answer',
                checkboxChecked: true,
            };

            dialog.showMessageBox(null, options, (response, checkboxChecked) => {
                console.log(response);
                console.log(checkboxChecked);
            });

        }
    }];
};

```

---

<div class="post-metadata">

**Author:** ![davidgs](https://forum.bpmn.io/user_avatar/forum.bpmn.io/davidgs/32/2270_2.png) [@davidgs](https://forum.bpmn.io/u/davidgs)\
**Post date:** [December 10, 2021, 3:20pm UTC](https://forum.bpmn.io/t/custom-modeler-plugin-debugging/7021/4 "2021-12-10T15:20:00Z")

</div>

Sorry, I should have been more specific. There’s also an `index.js` file in the src directory that should look something like:

```auto
import { registerBpmnJSPlugin, registerBpmnJSModdleExtension, registerClientExtension } from 'camunda-modeler-plugin-helpers';
import ModelPlugin from './ModelPlugin';
import props from './bpmn-js-extension/props.json';
registerBpmnJSModdleExtension(props); // if you're extending the moddle with specific extensions
registerBpmnJSPlugin(ModelPlugin); // if you're adding to the Modeler itself. 

```

---

<div class="post-metadata">

**Author:** ![luk3tt0](https://forum.bpmn.io/user_avatar/forum.bpmn.io/luk3tt0/32/3277_2.png) [@luk3tt0](https://forum.bpmn.io/u/luk3tt0)\
**Post date:** [December 10, 2021, 4:04pm UTC](https://forum.bpmn.io/t/custom-modeler-plugin-debugging/7021/5 "2021-12-10T16:04:22Z")

</div>

My target Is Hello world plugin

1 add a menu item DONE  
2 catch click event DONE  
3 print message into developer tool console ???  
4 debug with developer tool (brackpoints, Watch…)

After this I can improve my plugin

Thanks

---

<div class="post-metadata">

**Author:** ![Ingo\_Richtsmeier](https://forum.bpmn.io/user_avatar/forum.bpmn.io/ingo_richtsmeier/32/4730_2.png) [@Ingo\_Richtsmeier](https://forum.bpmn.io/u/Ingo_Richtsmeier)\
**Post date:** [December 10, 2021, 4:26pm UTC](https://forum.bpmn.io/t/custom-modeler-plugin-debugging/7021/6 "2021-12-10T16:26:51Z")

</div>

Hi @luk3tt0,

some time ago I tried out this example plugin: [GitHub - camunda/camunda-modeler-plugin-example: Plugin example for the Camunda Modeler. Use this as a starting point for creating your own plugins.](https://github.com/camunda/camunda-modeler-plugin-example)

It writes some output on the console and I found the output in my modeler console: [camunda-modeler-plugin-example/ExampleExtensionService.js at master · camunda/camunda-modeler-plugin-example · GitHub](https://github.com/camunda/camunda-modeler-plugin-example/blob/master/client/bpmn-js-extension/ExampleExtensionService.js#L14)

Hope this helps, Ingo

---

<div class="post-metadata">

**Author:** ![nikku](https://forum.bpmn.io/user_avatar/forum.bpmn.io/nikku/32/5130_2.png) [@nikku](https://forum.bpmn.io/u/nikku)\
**Post date:** [July 22, 2025, 3:41pm UTC](https://forum.bpmn.io/t/custom-modeler-plugin-debugging/7021/8 "2025-07-22T15:41:40Z")

</div>

Closed on July 22, 2025, 3:41pm UTC


