How to do android lamw debugging lazarus / 43-Android ---------------------------------------------------------------------- gary · 2024-12-31 05:58 This is how I installed it and it also works fine on the emulator https://forum.lazarus.freepascal.org/index.php/topic,69691.0.html But I set it up according to the following documentation, which I didn't understand too well https://github.com/jmpessoa/lazandroidmodulewizard/blob/master/docs/LA MW_DebugApkFromIDE.txt But I don't have the GNU remote debugger (gdbserver) LAMW here, but I can ADD IDE options/debugger Select debugger type: 'GNU remote debugger (gdbserver) LAMW' I set a breakpoint in the code, but nothing happens. I set a breakpoint in the code, nothing happens, the program is still running normally in the emulator, and it doesn't stop at this place. Is there something I'm missing, or is there something I'm not configuring correctly, can someone please tell me the details of the process, thanks! ---------------------------------------------------------------------- Seenkao · 2024-12-31 06:36 Как я понимаю, вам в параметрах проекта надо включить отладку. Google translate: As I understand it, you need to enable debugging in the project settings. Quote7) Project/Project Option/Compile options/Debugging:        -> generate Dedug information,        -> type automatic,        -> Disp line numbers,        -> use external gdb symb ---------------------------------------------------------------------- gary · 2024-12-31 15:41 I've seen this note inside the documentation, but I don't have these inside my debug settings ---------------------------------------------------------------------- Seenkao · 2024-12-31 18:11 Как вы открыли эту вкладку? Она похожа на нужную и не похожа одновременно. Google translate: How did you open this tab? It looks like the one you need and it doesn't at the same time. ---------------------------------------------------------------------- gary · 2025-01-02 10:53 Quote from: Seenkao on December 31, 2024, 07:11:17 pmКак вы открыли эту вкладку? Она похожа на нужную и не похожа одновременно. Google translate: How did you open this tab? It looks like the one you need and it doesn't at the same time. Click on the IDE toolbar and voila! ---------------------------------------------------------------------- Seenkao · 2025-01-02 12:14 "Type of debug info" = Quoteautomatic ---------------------------------------------------------------------- gary · 2025-01-03 18:03 Quote from: Seenkao on January 02, 2025, 01:14:09 pm"Type of debug info" = Quoteautomatic It still doesn't work, it still can't be debugged, is it ok for you to operate like this? ---------------------------------------------------------------------- Seenkao · 2025-01-03 22:01 Я установил LAMW на своей системе Debian 12. И вот что я вижу: Вы можете попробовать такие шаги: Tools -> Options -> Debugger -> Debugger backend закладка: "Add" Debugger type and path выбрать: "GNU remote debugger (gdbserver) LAMW" далее: "Apply" и "Ok" Проверьте работает ли. И будьте внимательны, я не вижу собранной библиотеки отладки для x86-64, потому возможно для 64-х битных приложений x86 отладка работать не будет. В этом случае делайте эмулятор для x86. P.S. Не учёл: после выбора типа отладчика, нужно указать путь до gdb (он лежит в папке NDK). У меня примерно выглядит так: ".../ndk/25.1.8937393/prebuilt/linux-x86_64/bin/ndk-gdb" P.P.S. В настройках проекта, в "Compiler Options" "Target CPU family (-P)" - здесь для эмулятора или для вашего устройства вы должны выбрать нужную архитектуру! Например для 32-х битной x86 надо выбрать "i386". ---------------------------------------------------------------------- -------- Google translate: I installed LAMW on my Debian 12 system. And this is what I see: You can try these steps: Tools -> Options -> Debugger -> Debugger backend tab: "Add" Debugger type and path select: "GNU remote debugger (gdbserver) LAMW" then: "Apply" and "Ok" Check if it works. And be careful, I don’t see a built-in debugging library for x86-64, so it’s possible that debugging won’t work for 64-bit x86 applications. In this case, make an emulator for x86. P.S. I didn't take into account: after selecting the debugger type, you need to specify the path to gdb (it is in the NDK folder). Mine looks something like this: ".../ndk/25.1.8937393/prebuilt/linux-x86_64/bin/ndk-gdb" P.P.S. In the project settings, in "Compiler Options" "Target CPU family (-P)" - here for the emulator or for your device you must select the desired architecture! For example, for 32-bit x86 you must select "i386". ---------------------------------------------------------------------- gary · 2025-01-04 04:25 I did what was asked of me and it still doesn't work, don't know what I'm missing ---------------------------------------------------------------------- gary · 2025-01-04 05:01 I can't see the 12-step result at all https://github.com/jmpessoa/lazandroidmodulewizard/blob/master/docs/LA MW_DebugApkFromIDE.txt ---------------------------------------------------------------------- Seenkao · 2025-01-04 06:42 Если вы запустили программу, то результат должен быть на эмуляторе или телефоне. Для работы приложения должна быть выбрана конечная архитектура телефона или эмулятора. Так же APK-файл должен находится в папке проекта. Путь до него и его имя указан у вас в настройках проекта (но не факт что там же находится APK файл). Попробуйте его найти там где указан вывод файла или в папке "obj". Но честно говоря, я не знаю куда сделан вывод APK, потому его вам придётся найти самому. -------------------------------- Google translate: If you run the program, the result should be on the emulator or phone. The final architecture of the phone or emulator must be selected for the application to work. The APK file must also be in the project folder. The path to it and its name are specified in your project settings (but it is not a fact that the APK file is located there). Try to find it where the file output is specified or in the "obj" folder. But honestly, I don't know where the APK output is made, so you will have to find it yourself. ---------------------------------------------------------------------- gary · 2025-01-04 13:32 I use an emulator and my APP can appear on the emulator and run fine. My emulator is x86_64 and the CPU architecture is correct. I can compile and run it normally, but it just won't F9 ---------------------------------------------------------------------- Seenkao · 2025-01-04 16:29 Cпросите у jmpessoa. Он разрабатывал (разрабатывает) данный модуль, и у меня нет ни времени ни желания "ковыряться" с LAMW. С учётом того, что сборка LAMW-проектов под Android для Linux - сломана. И я не могу на многие вопросы вообще ответить, потому что не могу даже собрать проект. А для запуска проекта, нажмите пункт "Run", там будет пункт "[LAMW] Build Android Apk and Run". ---------------------------------- Google translate: Ask jmpessoa. He developed (is developing) this module, and I have neither the time nor the desire to "poke around" with LAMW. Considering that the assembly of LAMW projects for Android on Linux is broken. And I can't answer many questions at all, because I can't even build the project. And to run the project, click "Run", there will be an item "[LAMW] Build Android Apk and Run". ---------------------------------------------------------------------- gary · 2025-01-05 02:54 Only jmpessoa has seen this post and may answer it, but I thank you for your help as well.