Forum > macOS / Mac OS X

MacBook M1 Silicon install debugger help

(1/2) > >>

redspark:
Today, I managed to get through this whole process except for the Debugger.  I installed the packages for:


* fpdebug
* LazDebuggerFpLldb
* LazDebuggerFp
But the Debugger isn't being found when I start Lazarus.  Any idea what I missed?  Do I just use the /usr/bin/lldb?

Thanks.

James

trev:
Did you follow the Wiki Installing Lazarus on macOS instructions? There's a section on setting up the debugger.

Grahame Grieve:
I have followed these instructions, and I have FPC+Lazarus (3.3.1/2.1.0 - trunk) running on my Mac M1. I have, so far as I can figure, only one problem:

when I am debugging, and I try to see a variable value, I got the following message:

s = Internal error: Missing data location

Project options are -gw -godwarfsets -gl. Preferences say that the debugger backend is LLDB debugger (with fpdebug).  (path = /usr/bin/lldb).

I do see a stack, and breakpoints work.

Debug Output shows this:
(lldb) version
lldb-1200.0.44.2
Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)

but nothing useful in the dump of stuff that gets cut off above that

What can I do so I can see variable values?

trev:

--- Quote from: Grahame Grieve on January 31, 2021, 10:21:36 am ---What can I do so I can see variable values?
--- End quote ---

Alas, I'm an old C programmer, this is what I usually do (don't laugh):


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---program myvartest;  {$mode objfpc}{$H+}{$modeswitch objectivec1} {$DEFINE DEBUG} uses  CocoaAll; var  myVarStr: string;  myVarInt: Integer; begin  myVarStr := 'Testing';  myVarInt := 23;   {$IFDEF DEBUG}  NSLog(NSStr('myVarStr: %@'), NSStr(myVarStr));  NSLog(NSStr('myVarInt: %i'), myVarint);  {$ENDIF}end.
when needed which produces:


--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---2021-01-31 21:06:29.683 myvar[1859:132217] myVarStr: Testing2021-01-31 21:06:29.683 myvar[1859:132217] myVarInt: 23
in the terminal and:


--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Type    Time                    Process Message---------------------------------------------------------default 21:08:15.211153 +1100   myvar   myVarStr: Testingdefault 21:08:15.211240 +1100   myvar   myVarInt: 23
in the console system log.

Grahame Grieve:
well... yes, I can do that, but it's not substitute for seeing variable values in the debugger....

Navigation

[0] Message Index

[#] Next page

Go to full version