@AT 0 Posted February 14 I'm trying to debug shared library loaded by Linux application. I need to attach debugging session to existing process on remote machine. However, ""Run"->"Attach To Process" configuration form is empty for any debuggers except Windows debuggers. Delphi documentation refers that I should select Connection Profile for remote debugger; however, this field is not available I choose Linux 64-Bit debugger, or any other non-Windows debugger in "Attach To Process" configuration form. I use Delphi 11.4 and 12 IDEs both of them have the same behavior. "Attach To Process" configuration from looks like at attached screenshot. Does anyone have experience with experience with attaching to the Linux process debugging in Delphi/RAD Studio IDE? Share this post Link to post
Remy Lebeau 1396 Posted February 14 Did you setup your Connection Profile(s) for the target debugger(s) before invoking the "Attach to Process" dialog? Share this post Link to post
@AT 0 Posted February 14 Hello Remy,, Of course, I have configured Connection profile already. Regular debugging with "Run", "Run with parameters...", "Load Process..." work well with Linux. The problem is only with "Attach To Process" debugging. Share this post Link to post
@AT 0 Posted February 19 (edited) I'm wondering if anyone debugs non-windows application 🙂 Edited February 19 by @AT Share this post Link to post
havrlisan 24 Posted February 19 (edited) 2 hours ago, @AT said: I'm wondering if anyone debugs non-windows application 🙂 Many people do. I regularly debug my apps on Android and iOS, and less often on OS X. It's not as easy as debugging on Windows, but it's doable and most of the time helpful. I haven't attempted debugging on Linux, so cannot help you much there, although I can say that attaching the debugger may fail even when running the app through the IDE (especially on Android), so I presume attaching the debugger while the app is already running is even more painful. Edited February 19 by havrlisan Share this post Link to post
@AT 0 Posted February 19 12 hours ago, havrlisan said: Many people do. I regularly debug my apps on Android and iOS, and less often on OS X. It's not as easy as debugging on Windows, but it's doable and most of the time helpful. I haven't attempted debugging on Linux, so cannot help you much there, although I can say that attaching the debugger may fail even when running the app through the IDE (especially on Android), so I presume attaching the debugger while the app is already running is even more painful. Thank you havrlisan for you comment. However, my original question is a first post in this thread. I'm wondering if anyone uses "Attach to the process" debugger functionality with non-Windows applications and does anyone have the similar issue as I described in that post. Share this post Link to post
Lars Fosdal 1792 Posted February 20 @@AT I assume you have read these? https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Attach_to_Process https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Attaching_to_a_Running_Process Share this post Link to post
@AT 0 Posted February 20 3 hours ago, Lars Fosdal said: @@AT I assume you have read these? https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Attach_to_Process https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Attaching_to_a_Running_Process Hello Lars, Of course, I have read that; however it works well for local and remote Windows Debugging only. Ok, let me explain the issue in more details. II have environments developing Delphi applications for Windows, MacOS and Linux for long time. They are more or less stable for normal application development and debugging. However, I can use remote debugging for Linux and MacOS only using "Run Debug" option. "Launch Process" and "Attach to Process" do not work with with MacOS and Linux debuggers. I just found that RAD Studio documentation in this area is unsynchronized and confused: Two documents below describe how to set-up remote debugging including "Attach to Process" and "Load Process" with remote Linux and MacOS. https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Attach_to_Process https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Attaching_to_a_Running_Process However, the https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Debugging_Multi-Device_Applications says "Attachment to a running process is not supported for the Embarcadero Linux 64-bit Debugger, Embarcadero iOS Device 64-bit Debugger, Embarcadero Android 32-bit Debugger, Embarcadero Android 64-bit Debugger, Embarcadero macOS 64-bit Debugger, and Embarcadero macOS ARM 64-bit Debugger.". This document also confirm that "Load Process" debugging functionality works on Linux and MacOS. However, in my environment the "Launch Process" displays error message Unable to start LLDB kernel: "Unable to find program, gdb.exe", which does look weird for me. Share this post Link to post
Lars Fosdal 1792 Posted February 21 Is the gdb.exe in the path? I.e. can it be started from the folder / user context where the remote debug server is running? Can it be related to which user context the process is running in? When QP eventually gets back online, I suggest filing a report if you can't find an explanation for the inability find gdb.exe. Share this post Link to post
@AT 0 Posted February 22 18 hours ago, Lars Fosdal said: Is the gdb.exe in the path? I.e. can it be started from the folder / user context where the remote debug server is running? Can it be related to which user context the process is running in? When QP eventually gets back online, I suggest filing a report if you can't find an explanation for the inability find gdb.exe. Hello Lars, I'm absolutely unsure that gdb.exe must be installed on the development host. Starting 11.3 Delphi support only LLDB: https://docwiki.embarcadero.com/RADStudio/Athens/en/11_Alexandria_-_Release_3#Debuggers Share this post Link to post