The subject tells it all.
In order to do a minimum debug of a LCB extension running on iOS hardware, I need to be able, in the .lcb file, to log some debug messages to the Console app or the Terminal, where I can filter and read them.
In the Console now I can already see a lot of messages from the iOS, also related to the test standalone, but none coming from the extension I am trying to build.
An example would be appreciated.
Thanks
Log LCB to Console.app or OSX terminal
Log LCB to Console.app or OSX terminal
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
Re: Log LCB to Console.app or OSX terminal
Hi Trevix,
I used "log" while debugging LCB scripts with the built in display of LC when debugging and it displays the values in the debugger window of LC.
But looking at the dictionary for LCB it seems that you can "log" to console too.
But may be I am wrong.
Kind regards
Bernd
I used "log" while debugging LCB scripts with the built in display of LC when debugging and it displays the values in the debugger window of LC.
But looking at the dictionary for LCB it seems that you can "log" to console too.
But may be I am wrong.
Kind regards
Bernd
Re: Log LCB to Console.app or OSX terminal
I am not sure to understand. For "the debugger window of LC" you mean the msg window or the Livecode Extenion Builder Window?I used "log" while debugging LCB scripts with the built in display of LC when debugging and it displays the values in the debugger window of LC.
What I found:
- the command "log" in the lcb does not reach the LCB window, nor the msg window
- console.app only gets iOS messages, not my personal log command of lcb. Useful but not so much given the verbosity
- while the adb logcat work well in the terminal for Android, I couldn't find a similar thing for iOS
On iOS I had to redirect all LCB messages to the LC message window, inserting this in the .lcb file (cumbersome):
Code: Select all
private handler IOSLog(in pMessage as String) returns nothing
if sCurrentPlatform is "ios" and sTarget is not nothing then
-- Send debug message to LiveCode script as a custom message
post "minewIOSDebugLog" to sTarget with [pMessage]
end if
-- Also use regular log for other platforms
log pMessage
end handler
Can you confirm all this?
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
Re: Log LCB to Console.app or OSX terminal
Hi Trevix,
I never used "log" in iOS or any other app, only in the IDE when debugging LCB widgets using the "Extension Builder".
Sorry to be of no help here. I just looked at the LCB-dictionary for "log" as well as in the LCS-dictionary for "log" and had the impression that the LCS "log" had the ability to be used on the supported platforms.
But the syntax description is confusing for me.
KInd regards
Bernd
I never used "log" in iOS or any other app, only in the IDE when debugging LCB widgets using the "Extension Builder".
Sorry to be of no help here. I just looked at the LCB-dictionary for "log" as well as in the LCS-dictionary for "log" and had the impression that the LCS "log" had the ability to be used on the supported platforms.
But the syntax description is confusing for me.
KInd regards
Bernd