Page 1 of 1
LCB Debugging Strategies
Posted: Wed Mar 25, 2015 11:06 pm
by mdoub
I am clearly spoiled by having used the LCS environment for so long. What are the recommended debugging strategies to be used when developing complex libraries? Are there any LCB debugging tools in the roadmap?
-= Mike
Re: LCB Debugging Strategies
Posted: Wed Mar 25, 2015 11:51 pm
by LCMark
@mdoub: At the moment you are limited to using the 'log' command in LCB which outputs messages into the extension builder log field. However, we are intending for there to be an out of process debugger which will allow you to step through code like the debugger in LCS and other environments.
As LCB integrates with the engine in the same way as C++ code does, it does have to be a separate process which connects to a running engine instance (indeed, given that using foreign handlers can cause crashes if you use them or define them incorrectly, a more traditional architecture for the debugger seems a wise path!)
Re: LCB Debugging Strategies
Posted: Thu Mar 26, 2015 3:14 am
by trevordevore
@mdoub: Note that the docs have an overly verbose example for 'log'. Rather than building up a list using 'push' use the shorthand:
Code: Select all
variable tPoint as Point
put point [0,10] into tPoint
log "%@" with [tPoint]
Re: LCB Debugging Strategies
Posted: Thu Mar 26, 2015 10:21 am
by peter-b
trevordevore wrote:@mdoub: Note that the docs have an overly verbose example for 'log'. Rather than building up a list using 'push' use the shorthand:
Code: Select all
variable tPoint as Point
put point [0,10] into tPoint
log "%@" with [tPoint]
Or, even more concisely:
Re: LCB Debugging Strategies
Posted: Thu Mar 26, 2015 12:01 pm
by trevordevore
@peter-b: true. When debugging you are usually logging the values of variables which is why I used one in my example.
Re: LCB Debugging Strategies
Posted: Thu Mar 26, 2015 1:23 pm
by LCMark
@trevordevore: I think @peter-b was intimating that there is a 'log expr' form as well as 'log format with params' form. I.e you can do 'log tVar'
Re: LCB Debugging Strategies
Posted: Wed Aug 16, 2023 3:26 pm
by trevix
Hello.
@mdoub: At the moment you are limited to using the 'log' command in LCB which outputs messages into the extension builder log field. However, we are intending for there to be an out of process debugger which will allow you to step through code like the debugger in LCS and other environments.
What happened to the debugger? Where is LCB going to?
Should I ask A.I. to debug for me?
Regards
Trevix
Re: LCB Debugging Strategies
Posted: Wed Aug 16, 2023 6:26 pm
by stam
I think your second question is the interesting one… where is LCB going?
I’d like to see a lot more IDE support for it and more resources as a lot of this requires a huge amount of searching for little nuggets here and there. LCB seems to be LC’s illegitimate ginger haired love child no one wants to talk about…
LCB still needed for linking external frameworks but for widgets and libraries we now have native LC tools. Script Widgets need a bit of refinement maybe but work really quite well… and have a tiny learning curve (although as per LCB documentation is a bit lacking and limited essentially to the single lesson posted by Heather).
LCB would just be too time consuming for me personally - I have very limited time to code and when I do I’m not in the frame of mind to either learn a new language or waste hours searching for clues how to do things…
I wonder how much support for either LCB or script widgets will be built into the new IDE?
Re: LCB Debugging Strategies
Posted: Sat Aug 19, 2023 4:55 pm
by mwieder
Since the arc of LC's future seems to bend toward dumbing things down to a no-code approach, I wouldn't count on either of these getting much love.
The "out of process debugger" LCMark proposed eight years ago would have been useful.
I wonder how the LC team debugs their own LCB widgets. Log statements are so 1990s.
Re: LCB Debugging Strategies
Posted: Sat Aug 19, 2023 5:28 pm
by trevix
Monte probably knows, since he created form me a complex extension, involving a SDK.