Lazarus
Programming => Operating Systems => macOS / Mac OS X => Topic started by: MISV on January 30, 2019, 02:04:08 pm
-
I updated Lazarus yesterday due to other problems
In Tools -> Options -> Debugger I have selected LLDB (Alpha)
However - when I try run my program it never comes up. Lazarus writes "(debugging ...)" in its title but nothing happens.
I started Lazarus using "startlazarus"
My project options - compiler options - debugging has:
* Checked option to generate debugging info for GDB (maybe wrong when using LLDB? But does it hurt?)
* Type of debug info: Dwarf with sets (-gw -godwarfsets)
No errors are reported... It just like hangs
-
I updated Lazarus yesterday due to other problems
Updated to which version?
My project options - compiler options - debugging has:
* Checked option to generate debugging info for GDB (maybe wrong when using LLDB? But does it hurt?)
* Type of debug info: Dwarf with sets (-gw -godwarfsets)
That is the correct setting. LLDB and GDB both use dwarf. The caption needs updating.
No errors are reported... It just like hangs
1) Does it run, if you do "Run" => "Run without debugging"!
2) 32 or 64 bit? Same bitness as the IDE, or cross compiled?
(IIRC debugging 64/32 cross compile requires fixes branch past rc3)
3) GUI or console app?
I assume GUI. Is the option to create a bundle set?
Does your app do any write(ln) to console, that may fail if stdout is closed?
(I do not know if redirecting stdout under debugger works)
4) Can you produce a log?
http://forum.lazarus-ide.org/index.php/topic,42869.0.html
-
In Tools -> Options -> Debugger I have selected LLDB (Alpha)
Not related to your problem, but any reason why you do not use the "lldb (with fpdebug / beta)"?
Well yes, it still has issues in rc3, but should be good in very latest fixes.
It should make watches much more user friendly.
-
If the IDE itself hands or misbehave after trying to debug, then please try the advice from this post: http://forum.lazarus-ide.org/index.php/topic,42869.msg309550.html#msg309550
-
FPC 3.0.4 + Lazarus v2.1.0 r60244M x76_64-darwin-cocoa (alpha)
I can not select "lldb (with fpdebug / beta)" - it is not in the dropdown list in "Debugger" options ... Should there be another option?
Yes, app runs fine when using "Run without debugging" - it is 64bit Cocoa app
GUI - not doing anything console output
I do not recall having seen any option called "bundle set", but I do have a info.plist file in the .app file. (Been working fine earlier.)
Will look into adding log / viewing the link you posted
-
Installing LazDebuggerFpLldb and switching to that did not help... It still just hangs... But I will try restart... See if that maybe helps
Would it help diagnosing/troubleshooting the problem is I run it from command line?
-
I can not select "lldb (with fpdebug / beta)" - it is not in the dropdown list in "Debugger" options ... Should there be another option?
Install the package components/lazdebuggers/lazdebuggerFpLldb
I do not recall having seen any option called "bundle set", but I do have a info.plist file in the .app file. (Been working fine earlier.)
If it works without debugging, it is probably set. Project Options > Application: bottom of the page "for MacOS"
One more. Try with/without -Xg (external debug info)
-
Would it help diagnosing/troubleshooting the problem is I run it from command line?
The IDE outputs some info, if you have a command line. But if you use --debug-log (as in the referenced post) then it all goes to the log file.
-
One more question.
When you started the debugger. Use ps or top, to see if your app is in memory.
---
Also, try with a new empty app.
-
- Restart did not help.
- I have checked Project Options > Application: bottom of the page "for MacOS"
- Using Top(maximized) and "Activity Monitor" did not reveal my app is running. (GDB seems to be running though? with parent process being Lazarus?) ... Forcing quit triggers Lazarus dialog about debugger error state
- New... New application... Prompted for enabled dwarf2 with sets (yes) - prompted for bundle (yes) ... And this also does not start
...
I think the problem is Lazarus is starting GDB and not LLDB ... just tried forcing quit GDB and run new project ... And again I can see GDB pop up...
-
Tools > Options > Debugger.
Below the drop down under "Debugger type and path" is an edit field. (NOT "additional search path", above that).
This edit must have the path to lldb. usually
/usr/bin/lldb
-
You are right... That works. Somehow I missed that. (Doh!)
Thank you :)
-
I seem to be experiencing this problem again - Lazarus stalls when debugging but running without debugging works:
Tools:Options:Debugger: LLDB Debugger (with fpdebug) (Beta)
Tools:Options:Debugger: /usr/bin/lldb (file is there)
Project:Options:Compiler options:Debugging:Generate debugging info = checked
Project:Options:Compiler options:Debugging:Type of debug info = Dwarf with sets (-gw -godwarfsets)
Project:Options:Compiler options:Custom Options: -WM10.8
Project:Options:Compiler options:Applications and Override: -vd -va LCLWidgetType:=cocoa -FD/Library/Developer/CommnadLineTools/usr/bin
Project:Options:Project Settings:Application:Use Application Bundle for running and debugging
Custom Options: -WM10.8
Mojave 10.14.4
Lazarus IDE: 2.1.0 r60244M
-
Can you get a logfile please
https://forum.lazarus.freepascal.org/index.php/topic,42869.0.html