discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: Debugging OpenSCAD code

JG
Jonathan Gilbert
Mon, Oct 17, 2022 10:20 PM

I had the same experience, and ended up adding assignment instrumenting
within logging.scad 1, and scattered assignment debugging elements
throughout some of my more complex models. It's not great, but it met my
needs.

I'd also love a better experience debugging within openscad, but I kind of
struggle to envision what that'd look like: just a simple breakpoint system
that pauses at specified moments? Doesn't the nature of how OpenSCAD
interpret commands and render models preclude that from being easy to
implement?

On Mon, Oct 17, 2022 at 3:15 PM William Lugg via Discuss <
discuss@lists.openscad.org> wrote:

---------- Forwarded message ----------
From: William Lugg luggw1@protonmail.com
To: "Jan Öhman via Discuss" discuss@lists.openscad.org
Cc:
Bcc:
Date: Mon, 17 Oct 2022 22:14:02 +0000
Subject: [OpenSCAD] Debugging OpenSCAD code
As far as I can tell right now there is no way to set breakpoints, step
through code or examine the contents of variables except through the use
of the echo function, which is fairly effective.

Are there any plans to improve the debugging aspects of the code editor
to add the ability to set breakpoints and to step through code a line at
a time in the future?  I find it quite a handicap not to be able to do
this at times.

Thanks
Bill Lugg

---------- Forwarded message ----------
From: William Lugg via Discuss discuss@lists.openscad.org
To: "Jan Öhman via Discuss" discuss@lists.openscad.org
Cc: William Lugg luggw1@protonmail.com
Bcc:
Date: Mon, 17 Oct 2022 22:14:02 +0000
Subject: [OpenSCAD] Debugging OpenSCAD code


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

I had the same experience, and ended up adding assignment instrumenting within logging.scad [1], and scattered assignment debugging elements throughout some of my more complex models. It's not *great*, but it met my needs. I'd also love a better experience debugging within openscad, but I kind of struggle to envision what that'd look like: just a simple breakpoint system that pauses at specified moments? Doesn't the nature of how OpenSCAD interpret commands and render models preclude that from being easy to implement? [1]: https://github.com/jon-gilbert/openscad_logging On Mon, Oct 17, 2022 at 3:15 PM William Lugg via Discuss < discuss@lists.openscad.org> wrote: > > > > ---------- Forwarded message ---------- > From: William Lugg <luggw1@protonmail.com> > To: "Jan Öhman via Discuss" <discuss@lists.openscad.org> > Cc: > Bcc: > Date: Mon, 17 Oct 2022 22:14:02 +0000 > Subject: [OpenSCAD] Debugging OpenSCAD code > As far as I can tell right now there is no way to set breakpoints, step > through code or examine the contents of variables except through the use > of the echo function, which is fairly effective. > > Are there any plans to improve the debugging aspects of the code editor > to add the ability to set breakpoints and to step through code a line at > a time in the future? I find it quite a handicap not to be able to do > this at times. > > Thanks > Bill Lugg > > > > ---------- Forwarded message ---------- > From: William Lugg via Discuss <discuss@lists.openscad.org> > To: "Jan Öhman via Discuss" <discuss@lists.openscad.org> > Cc: William Lugg <luggw1@protonmail.com> > Bcc: > Date: Mon, 17 Oct 2022 22:14:02 +0000 > Subject: [OpenSCAD] Debugging OpenSCAD code > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > -- - Jon Gilbert jong@jong.org / jgilbertsjc@gmail.com