Forum > Debugger
Problems with debugging
(1/1)
backprop:
I have no idea which debugger to use. Any I have tried make problems
Whenever new project is created it demand to be used one of three debug info formats. But when using any debugger it making various problems.
With even simplest app, SIGSEG error raised at end of execution. Even it is evident that there is no memory leaks. Then three times need to stop debugger with Ctrl-F2 or pressing three times on stop debugging button.
Can anyone check and fix that? I do not recall that Lazarus 2.x had such problems.
Lazarus 3.2, FPC 3.2.2 installed from DEB files. KDE neon
Martin_fr:
I never got that error.
--- Quote ---I have no idea which debugger to use.
--- End quote ---
https://wiki.lazarus.freepascal.org/Debugger_Setup#Choosing_the_correct_debugger_backend
Gdb supports more platforms/architectures (FpDebug only support Intel/AMD and Win/Linux)
FpDebug however is more feature-rich and more stable.
https://wiki.freepascal.org/Debugger_Status
--- Quote ---Whenever new project is created it demand to be used one of three debug info formats
--- End quote ---
If that refers to the dialog that pops up before RUN, then you are using FpDebug (and that is good/correct).
With FpDebug it is recommended to use Dwarf-3
With GDB it is better to choose Dwarf-2 with sets
You can change that once in the project settings, and before closing the project settings dialog check the checkbox (bottom left corner) "Set compiler options as default". Then new projects will have it (ideally create the 2 buildmodes before doing this)
--- Quote ---With even simplest app, SIGSEG error raised at end of execution.
--- End quote ---
That is where I will need more info. Because it does not happen when I debug something (on Linux, though a different distro / several other distros).
In general, please make sure that for debugging you compile your project with optimization OFF (or at max level 1).
First of all the exact text of that exception dialog, or a screen shot.
It could be either (similar to either of)
- Project1 raised on exception (issued by the debugger)
- Lazarus / Access violation (the IDE itself crashed)
Also could you open a terminal (console), and run Lazarus from that terminal?
(If you have packages installed then you may need to find the lazarus exe in ~/.lazarus / or try startlazarus, but I am not sure the latter will do)
--- Code: Text [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---lazarus --debug-log=LOG_FILE --debug-enable=DBG_VERBOSE,DBG_WARNINGS,DBG_ERRORSDBG_STATE,DBG_EVENTS,DBGMI_QUEUE_DEBUG,DBG_FPDEBUG_VERBOSE,FPDBG_COMMANDS,FPDBG_THREADS,FPDBG_QUEUE,DBG_DATA_MONITORS,DBG_THREAD_AND_FRAME,DBG_CMD_ECHO,DBG_CMD_ECHO_FULL
Then upload the LOG_FILE please.
And if there is any output to the console: copy it and paste it here
Thank you.
Navigation
[0] Message Index