Sign up now! · Forgot password?
RSS/Atom feed identi.ca Twitter

Python plugin debugging and workflow

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

5 of 5 messages available
Toggle history

Please log in to manage your subscriptions.

Python plugin debugging and workflow Jon Decker 03 Apr 11:01
  Python plugin debugging and workflow Joao S. O. Bueno 04 Apr 12:53
   Python plugin debugging and workflow Ragnar Brynjúlfsson 04 Apr 13:01
    Python plugin debugging and workflow Jon Decker 04 Apr 13:15
    Python plugin debugging and workflow Jernej Simončič 04 Apr 17:52
Jon Decker
2012-04-03 11:01:40 UTC (over 2 years ago)

Python plugin debugging and workflow

Hello

I have a lot of work into my first large plugin. One thing that really slows my progress is the lack of any kind of debugging or work flow. For example, if I make a syntax error, the plugin will just silently fail, or fail to appear in the menu. I receive no erros or hints as to where the error occured. I normally have to commentoput code line-by-line and rerun the plugin until I find the offending line of code. I've wasted hours at a time finding small little bugs like this.

Is there a way to have gimp relay python errors?

I have also noticed that the python plugins will not run outside of gimp with the standard python interpreter (can't find the gimp imports).

Is there something I'm missing? Is this the workflow that everybody uses? Any hints or tips?

thanks!

Joao S. O. Bueno
2012-04-04 12:53:52 UTC (over 2 years ago)

Python plugin debugging and workflow

On 3 April 2012 08:01, Jon Decker wrote:

Hello

I have a lot of work into my first large plugin.  One thing that really slows my progress is the lack of any kind of debugging or work flow.  For example, if I make a syntax error, the plugin will just silently fail, or fail to appear in the menu.  I receive no erros or hints as to where the error occured.  I normally have to commentoput code line-by-line and rerun the plugin until I find the offending line of code.  I've wasted hours at a time finding small little bugs like this.

to detect syntax errors, just try to run your plug-ina s a normal Python program -
Syntax errors will be flagged normally - i the program is well formed, it will fail with an import error
when trying to import gimp or gimpfu

As fro runtime erros, just watch the normal error output of GIMP on the terminal.
(the good news is taht for fixing these errors, you just have to re-run the plugin from inside GIMP<
no need to reinstall or relaod anything).

js ->

Is there a way to have gimp relay python errors?

I have also noticed that the python plugins will not run outside of gimp with the standard python interpreter (can't find the gimp imports).

Is there something I'm missing?  Is this the workflow that everybody uses? Any hints or tips?

thanks!

_______________________________________________ gimp-developer-list mailing list
gimp-developer-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-developer-list

Ragnar Brynjúlfsson
2012-04-04 13:01:34 UTC (over 2 years ago)

Python plugin debugging and workflow

I'm assuming Jon is working on Windows. On Linux you can just start gimp from a terminal and get all the output you need, but when I was porting a plug-in I wrote to Windows, there was no info in the command line, and I had to resort to printing stuff to the gimp error console. Anyone know how to do this on windows.

One solution is, of course, to just install Linux (on a physical or virtual machine) and do the development on that.

Ragnar

On Wed, Apr 4, 2012 at 2:53 PM, Joao S. O. Bueno wrote:

On 3 April 2012 08:01, Jon Decker wrote:

Hello

I have a lot of work into my first large plugin. One thing that really slows my progress is the lack of any kind of debugging or work flow. For example, if I make a syntax error, the plugin will just silently fail, or fail to appear in the menu. I receive no erros or hints as to where the error occured. I normally have to commentoput code line-by-line and rerun the plugin until I find the offending line of code. I've wasted hours at a time finding small little bugs like this.

to detect syntax errors, just try to run your plug-ina s a normal Python program -
Syntax errors will be flagged normally - i the program is well formed, it will fail with an import error
when trying to import gimp or gimpfu

As fro runtime erros, just watch the normal error output of GIMP on the terminal.
(the good news is taht for fixing these errors, you just have to re-run the plugin from inside GIMP<
no need to reinstall or relaod anything).

js ->

Is there a way to have gimp relay python errors?

I have also noticed that the python plugins will not run outside of gimp with the standard python interpreter (can't find the gimp imports).

Is there something I'm missing? Is this the workflow that everybody uses? Any hints or tips?

thanks!

_______________________________________________ gimp-developer-list mailing list
gimp-developer-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-developer-list

_______________________________________________ gimp-developer-list mailing list
gimp-developer-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-developer-list

gimp-developer-list mailing list
gimp-developer-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-developer-list
Jon Decker
2012-04-04 13:15:08 UTC (over 2 years ago)

Python plugin debugging and workflow

Thanks for the info guys.

Yes, I am already developing on Linux (I am a long time linux user, I haven't touched Windows since win98). I'll start launching Gimp from the terminal and watching for output there On Apr 4, 2012 9:01 AM, "Ragnar Brynjúlfsson" wrote:

I'm assuming Jon is working on Windows. On Linux you can just start gimp from a terminal and get all the output you need, but when I was porting a plug-in I wrote to Windows, there was no info in the command line, and I had to resort to printing stuff to the gimp error console. Anyone know how to do this on windows.

One solution is, of course, to just install Linux (on a physical or virtual machine) and do the development on that.

Ragnar

On Wed, Apr 4, 2012 at 2:53 PM, Joao S. O. Bueno wrote:

On 3 April 2012 08:01, Jon Decker wrote:

Hello

I have a lot of work into my first large plugin. One thing that really slows my progress is the lack of any kind of debugging or work flow.

For

example, if I make a syntax error, the plugin will just silently fail,

or

fail to appear in the menu. I receive no erros or hints as to where the error occured. I normally have to commentoput code line-by-line and

rerun

the plugin until I find the offending line of code. I've wasted hours

at a

time finding small little bugs like this.

to detect syntax errors, just try to run your plug-ina s a normal Python program -
Syntax errors will be flagged normally - i the program is well formed, it will fail with an import error
when trying to import gimp or gimpfu

As fro runtime erros, just watch the normal error output of GIMP on the terminal.
(the good news is taht for fixing these errors, you just have to re-run the plugin from inside GIMP<
no need to reinstall or relaod anything).

js ->

Is there a way to have gimp relay python errors?

I have also noticed that the python plugins will not run outside of gimp with the standard python interpreter (can't find the gimp imports).

Is there something I'm missing? Is this the workflow that everybody

uses?

Any hints or tips?

thanks!

_______________________________________________ gimp-developer-list mailing list
gimp-developer-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-developer-list

_______________________________________________ gimp-developer-list mailing list
gimp-developer-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-developer-list

Jernej Simončič
2012-04-04 17:52:50 UTC (over 2 years ago)

Python plugin debugging and workflow

On Wednesday, April 4, 2012, 15:01:34, Ragnar Brynjlfsson wrote:

Anyone know how to do this on windows.

The simple way is to run gimp with --verbose switch - that'll open a console window.