[Lazarus] Enabling menu-options depending on a Lazarus-setting?

Joost van der Sluis joost at cnoc.nl
Tue Sep 2 13:11:15 CEST 2014

Hi all,

On Linux there's the option to view a window with the console-output of 
applications being debugged.

This option is enabled with the define DBG_ENABLE_TERMINAL in three units.

In debugger/debugger.pp the define is set for linux only, with the 
result that the window is actually visible in the menu.

In components/lazdebuggergdbmi/gdbmimiscclasses.pp and 
components/lazdebuggergdbmi/gdbmimiscclasses.pp the define is also set 
on linux, so that this debugger actually sends the console output to the 

Now I have my own debugger, and this debugger also supports the 
console-window on OS/X. So I could adapt the define in debugger.pp for 
OS/X, but then the menu-item also appears when a gdb-based debugger is 
used, which do not support this option on OS/X.

So, question: what would be the correct way to display this menu-option, 
based onto the selected debugger. (Add a property to TDebuggerIntf, but 
after that?)



More information about the Lazarus mailing list