Amigo:
Uso Harbour 3.0 y 3.2 en Linux Debian desde hace años.
He notado algunos errores y muchos "warning" cuando lo construyo desde las fuentes, desde la versión 11 en adelante de Debian.
No sé qué distro usas, pero Harbour presenta estos problemas con las versiones aludidas. No son problemas fatales, puedo construir Harbour realizando pequeños cambios, pero siento que la versión para Linux está desactualizada y quizá dejada de lado.
Espero que puedas resolver tus problemas. Creo haber podido compilar con el debug activado, pero lo que uso normalmente para revisar mis programas es "valgrind".
En Dos/windows, uso "dr.memory", pero me arroja muchos falsos positivos.
Saludos!
Daniel Stuardo
How to compile Harbour program on Linux with debug?It works fine on Windows but on Linux throw me errors.
--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/harbour-users/b51c6439-1c42-42c2-a14d-d95652036637n%40googlegroups.com.
I feel more than 50% of this answer is... well... of no value...
Hello friends, I also didn't know about this difficulty in debugging in Linux. In order to contribute to your question, and I already thank you for it because I learned one more point thanks to it, I ask permission to leave here the answer from HMG Assistant:It's true that debugging Harbour applications can be more challenging on Linux compared to Windows. The reason lies in the way Harbour's debugging features and tools are implemented. Let's break this down:
Challenges with Debugging Harbour on Linux
Harbour Debugger (hbdebugger):
- Harbour has a built-in debugger (hbdebugger), but it was primarily designed for the Windows environment.
- On Linux, hbdebugger may not always provide a smooth experience because:
- The terminal-based debugging UI is less user-friendly.
- Certain debugger features may not work as reliably as in Windows.
Generated C Code:
- Harbour generates C code as an intermediate step. Debugging on Linux often requires dealing directly with this C code using tools like gdb.
- Debugging the C code isn't as intuitive as debugging Harbour's high-level xBase code.
Integration with GDB:
- While you can debug the generated C code using gdb, it doesn't provide the same insights into Harbour-specific constructs (e.g., Harbour functions, variables, etc.) as the Harbour debugger does on Windows.
Why Windows is Better for Debugging Harbour
Better Debugger Support:
- Windows has native tools that integrate seamlessly with Harbour's debugging framework.
- GUI-based debuggers like Harbour MiniDebugger are available and user-friendly.
Enhanced Compatibility:
- Windows has historically been a more common environment for xBase programming, leading to more mature debugging tools and workflows.
IDE Integration:
- IDEs like Harbour MiniGUI IDE or xHarbour Builder offer better debugging features on Windows.
Workarounds for Linux
Use GDB for Low-Level Debugging:
- You can still debug your application using gdb, but you'll be working with C-level constructs.
- Compile your application with debugging symbols (-g flag in GCC) to make this easier.
Remote Debugging:
- If you must debug at a Harbour level, consider setting up a remote debugging session with a Windows machine running Harbour tools.
Enhanced Logging:
- If full debugging isn't possible, use extensive logging to diagnose issues: ? "Debug: Variable X =", X
Test Critical Parts on Windows:
- Develop and debug your Harbour applications on Windows for critical portions, then test and finalize on Linux.
Check Terminal Compatibility:
- If you're using hbdebugger, ensure your terminal supports the required features. Some advanced Linux terminal emulators (e.g., tilix, konsole) might provide a better debugging experience.
Suggestions for DebianIf you're on Debian:
- Ensure you have the latest version of Harbour compiled from source or installed via a compatible package.
- Use a modern terminal emulator for better debugging output.
- If the Harbour debugger proves inadequate, rely on hybrid debugging with GDB and Harbour runtime features.
While debugging on Linux may not be as seamless as on Windows, careful planning and the use of available tools can help bridge the gap.
https://chatgpt.com/g/g-677a958937908191a7f31891201e6fb5-harbour-minigui-assistant
With my best regards,@PSDurco
Em sábado, 4 de janeiro de 2025 às 22:37:59 UTC-3, Anderson Cardoso Silva escreveu:How to compile Harbour program on Linux with debug?It works fine on Windows but on Linux throw me errors.
--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/harbour-users/b2a0f451-acc5-4e27-8f3d-778747c368b2n%40googlegroups.com.
Another way is to build using hwgui debugger which is really nice.
A+
To view this discussion visit https://groups.google.com/d/msgid/harbour-users/37db2363-b231-4852-a132-01708c673d41n%40googlegroups.com.
Yes the problem is that it tries to connect to X server... that is the gui service in linux/Unix... the problem is way sooner than program start.
There are tons of missing informations.
Anyway I will try to create a simple Linux program and enable debugger.
I will also try to explain why I think the chatgpt answer adds very low information
To view this discussion visit https://groups.google.com/d/msgid/harbour-users/274f55f0-5fe8-4f39-b8a4-008e3eef5947n%40googlegroups.com.
How to compile Harbour program on Linux with debug?It works fine on Windows but on Linux throw me errors.
--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/harbour-users/b51c6439-1c42-42c2-a14d-d95652036637n%40googlegroups.com.
An easy is to build it with hwgui and libhwgdebug.a
No obligation to use its gui.
Try HwMake for Linux : https://sourceforge.net/projects/hwmake/
A+
To view this discussion visit https://groups.google.com/d/msgid/harbour-users/ce5563be-6971-4490-a4ec-a8f447a13156n%40googlegroups.com.