Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
simulate debug breakpoints
#5
(03-03-2024, 09:04 PM)Ofnuts Wrote:
(03-03-2024, 06:21 PM)gimpygirl Wrote:
(03-03-2024, 05:13 PM)Ofnuts Wrote: Typically I raise an exception where I want the code to stop: raise Exception("Stopping after adding mask"), but my script run inside a try/except block. But this isn't a breakpoint since the code will never restart afterwards. The closest you can be to a break point is to make the code sleep a bit:

Code:
import time

time.sleep(10) # sleep 10 seconds

IS there a true way to debug gimp plugins? Either on windows or linux?

No realistic way to run a debugger in a Gimp plugin. In theory, you could tweak either the Gimp configuration (windows) or the script shebang (Linux/OSX) to have the script be run by a debugger app, but I don't know anyone who tried that.

From Brian Kernighan, the "inventor" of the C language and the guy who wrote a good deal of early Unix;

Quote:The most effective debugging tool is still careful thought, coupled with judiciously placed print statements.
  • "Unix for Beginners" (1979)

Personally, as a professional software developer, I rarely use debuggers, and in practice the "careful thought" part of debugging seems to be the most important, people good with debuggers are also good with print statements.

Will GIMP 3 have a debugger? I think it's useful
Why shouldn't python be debugged? You can debug python without gimp
Reply


Messages In This Thread
simulate debug breakpoints - by gimpygirl - 03-03-2024, 01:56 AM
RE: simulate debug breakpoints - by Ofnuts - 03-03-2024, 05:13 PM
RE: simulate debug breakpoints - by gimpygirl - 03-03-2024, 06:21 PM
RE: simulate debug breakpoints - by Ofnuts - 03-03-2024, 09:04 PM
RE: simulate debug breakpoints - by gimpygirl - 03-04-2024, 02:40 AM
RE: simulate debug breakpoints - by Ofnuts - 03-04-2024, 08:49 AM

Forum Jump: