Lazarus 2.0.0 and LLDB: no output in the Messages window lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- jouborg · 2019-02-17 22:00 Hi, When I run my console app, none of the Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i writeln output appear in the Messages window. When I run the app from a terminal, everything outputs correctly. Thoughts? ---------------------------------------------------------------------- Martin_fr · 2019-02-17 22:19 This is a known issue. It applies to OSx, independent of the debugger (so if you codesign gdb, and use gdb, there is also no output). IIRC (but I have to double check) it requires a virtual tty to be implemented. ---------------------------------------------------------------------- Martin_fr · 2019-02-20 19:01 I added a workaround. Get the changes from https://svn.freepascal.org/cgi- bin/viewvc.cgi?view=revision&root=lazarus&revision=60470 (use as patch) Using the lldb/fpdebug based debugger, in Tools > Option > Debugger, will be a field "LaunchNewTerminal", check it and a terminal will open when you debug your app. This setting is global, and affects all apps in the debugger. There is no (not yet) per project option. Also the terminal seems to stay open after debugging.... ---------------------------------------------------------------------- dbannon · 2019-02-25 12:06 Martin, is it intended that this work in a Carbon IDE ?  Using current Fixes_2_0 and applying the patches, I get a terminal window that contains - Code: [Select]Last login: Mon Feb 25 22:53:38 on ttys001 admins-MBP:~ dbannon$ /bin/bash -c 'arch -arch i386 '/Developer/Xcode- beta.app/Contents/SharedFrameworks/LLDB.framework/Resources/darwin- debug' --unix-socket=/tmp/649Lsn --arch=i386 --working-dir '/' --disable-aslr --env='XPC_SERVICE_NAME=lazarus.freepascal.ide.17080' --env='OS_ACTIVITY_DT_MODE=enable' --  '/Users/dbannon/Pascal/SmallTes t/DebugTest/project1.app/Contents/MacOS/project1' ; echo Process exited with status $?';exit arch: posix_spawnp: /Developer/Xcode- beta.app/Contents/SharedFrameworks/LLDB.framework/Resources/darwin- debug: Bad CPU type in executable Process exited with status 1 logout Saving session... ...copying shared history... ...saving history...truncating history files... ...completed. [Process completed] and no application running. Seems to be same result if I make a 32carbon or 64Cocoa app. Davo ---------------------------------------------------------------------- Martin_fr · 2019-02-25 12:36 It is actually a lldb feature. I am not sure what lldb supports. The IDE sets a flag for lldb, telling lldb to launch the app in a terminal.. The strange bit in your output, is that it would seem to me that lldb correctly identified 32bit "arch i386". However, I am myself not a Mac/OSX expert. (Despite my involvement in the lldb debugger). Maybe someone witch more experience can tell. ---------------------------------------------------------------------- dbannon · 2019-02-25 22:22 Yeah, to my surprise, lldb works fine in a 32bit IDE debugging a 32bit application. Or a 64bit application. The problem I am seeing is when I add your patches to show a terminal, to pickup writeln() output for example. Thats when things go wrong ..... (I cannot comment on how the patches work in a 64bit IDE, I have not been able to build a stable one recently...) Davo ---------------------------------------------------------------------- Martin_fr · 2019-02-25 23:57 Even if you have a 32bit IDE, you should be able to build your project for 64bit (Project Options > Target) Lldb should big that up. And the console too, I hope. I don't know if you can redirect the output to a file, then you can tail that. There are 2 more options that can be added/implemented to the IDE. But I need to find time to do that. (And potentially also docs on how to....) ---------------------------------------------------------------------- dbannon · 2019-02-26 00:43 Thanks Martin, its not really worrying me personally, I build my app from command line using Lazbuild and it all works fine. I don't need to do a lot of debugging on the Mac, so much easier on Linux (in part, at least, because of the console output). And, yep, last time I looked, redirection to a file was working OK. So, more in the way of some feedback. Even neg feedback is better that none ! And I do really appreciate the progress thats being made, thanks ! Davo ---------------------------------------------------------------------- Martin_fr · 2019-02-26 01:36 Well, thanks. Yes any feedback is good. Glad you are not stuck, due to this.