marcsosduma / cobgdb

Command-Line Debugger for GnuCOBOL on Linux and Windows
GNU General Public License v3.0
5 stars 1 forks source link

FR: add the COBGDB Version and Date at main screen #31

Closed eugeniodilo closed 6 months ago

eugeniodilo commented 8 months ago

I think it would be useful to have at the top of the screen on the left side, not only the writing COBGDB but also the version and compilation date . For example COBGDB v.1.12 050224 to indicate version 1.12 compiled on 05 February 2024.

VAR010

GitMensch commented 8 months ago

I vote against that for multiple reasons.

I totally vote for cobgdb --version to output that - is that the case already? If not @eugeniodilo do you agree that this would be enough? Note: the date is easy to have, using __DATE__.

eugeniodilo commented 8 months ago

Hi Simon, Marcos is currently releasing several versions that fix small bugs or otherwise make small changes. Knowing what version of the COBGDB product you are using right from the home screen when testing these releases can be helpful. Version and date are displayed in the header of the main screen by many products that have a user interface (among those that I use for example: OpenCobolIDE and almost all SPF/PC editors, SPFLite, SQLiteStudio ...).

Even the solution of adding a -v parameter can still be useful for the same purpose even if it seems to me to be less immediate.

Even a new command on the main screen for example X = Version and Author ... can be fine, or putting the information in the Help message ...

In any case, it is not clear to me what kind of problems it can cause to be against it. Maybe you could explain better?

GitMensch commented 8 months ago

I agree that additional to cobgdb --version it would be useful to have it in the TUI, for example at the end of the help screen. I'd "vote" against using another key as this would drop the option to use it for something else later.

Not printing it in the main screen has the benefit of:

eugeniodilo commented 8 months ago

OK, these arguments of yours are very acceptable (especially the last one). At this point I believe that the solution of adding Version and Date of the product (and also Author ?) at the bottom of the Help message may be the best.

eugeniodilo commented 8 months ago

Proposal for a new HELP Message:

    "                     COBGDB - HELP",
    " ",
    "COMMANDS: ",
    "----------",
    "B - Breakpoint: toggles the breakpoint at the current selected line",
    "    (can also be done with the mouse).",
    "R - Run: runs the program from the first statement until a breakpoint",
    "    is encountered.",
    "C - Cursor or Continue: runs the program until it reaches the",
    "    selected line.",
    "J - Jump: runs the program until it reaches the specified line.",
    "N - Next: runs the program until the next line but does not enter",
    "    a subroutine executed by CALL or PERFORM.",
    "S - Step: runs the program until the next line.",
    "G - GO: continues the program execution until it encounters a ",
    "    stopping point: breakpoint, end of the program, or the ",
    "    return from a subroutine - PERFORM/CALL.",
    "V - Variables: displays the set of variables for the running program.",
    "H - Show: shows the values of variables for the selected line",
    "    (right-click also functions).",
    "F - File: allows selecting the source file for debugging.",
    "Q - Quite: quits the program.",
    " ",
    "COBGDB takes one or more programs with COB/CBL extension as parameters",
    "and runs the GnuCOBOL compiler with the following format:",
    "cobc -g -fsource-location -ftraceall -v -O0 -x prog.cob prog2.cob ...",
    " ",
    "Example:",
    "cobgdb prog.cob subprog1.cob subprog2.cob",
    " ",
    "You can run GDB/GDBSERVER remotely using the 'A' key. COBGDD will",
    "prompt you to provide the server and port in the format",
    "server:port  or the PID of the application.",
    "Example:   localhost:5555   or    9112", 
    " ",
    "VERSION:",
    "---------",
    "COBGDB Version: 1.13 - 05.02.20124"
eugeniodilo commented 6 months ago

I'm closing this ticket because the --version option has been implemented