LCB Debugging Strategies
LCB Debugging Strategies
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
-= Mike
Re: LCB Debugging Strategies
@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!)
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!)
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Location: Overland Park, Kansas
- Contact:
Re: LCB Debugging Strategies
@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]
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
Re: LCB Debugging Strategies
Or, even more concisely: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]
Code: Select all
log point [0, 10]
LiveCode Open Source Team — @PeterTBBrett — peter.brett@livecode.com
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Location: Overland Park, Kansas
- Contact:
Re: LCB Debugging Strategies
@peter-b: true. When debugging you are usually logging the values of variables which is why I used one in my example.
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
Re: LCB Debugging Strategies
@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
Hello.
Should I ask A.I. to debug for me?
Regards
Trevix
What happened to the debugger? Where is LCB going to?@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.
Should I ask A.I. to debug for me?
Regards
Trevix
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
Re: LCB Debugging Strategies
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?
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?
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: LCB Debugging Strategies
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.
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.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
Re: LCB Debugging Strategies
Monte probably knows, since he created form me a complex extension, involving a SDK.
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>