How to debug the plugin?

Asked by Dmitry Semenov

How to debug the python plugin? I.e. put a breakpoint and go inside ipdb or something like this?

I am able to run

```
terminator -dd
```

and then switch to debugging TAB, but no commands that I put inside the plugin's code output anything anywhere, no IPDB invocation helped

so I need to debug the following function

```
def get_filepath(self, strmatch):
        filepath = None
        line = column = '1'
        print strmatch
        config = self.config.plugin_get_config(self.plugin_name)
        match = re.match(config['match'], strmatch)
        groups = [group for group in match.groups() if group is not None]
        group_names = config['groups'].split()

        for group_value, group_name in zip(groups, group_names):
            if group_name == 'file':
                filepath = os.path.join(self.get_cwd(), group_value)
                if not os.path.exists(filepath):
                    filepath = None
            elif group_name == 'line':
                line = group_value
            elif group_name == 'column':
                column = group_value
        return filepath, line, column

```

(this is editor_plugin) and adjust regexp solution.

So how to debug the plugin correctly?

Question information

Language:
English Edit question
Status:
Expired
For:
Terminator Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.