* * *

Author Topic: Laz 1.8 with gdb 6.3 'step over' is enabled, but 'Run to Cursor' is not  (Read 1850 times)

RonQ

  • New member
  • *
  • Posts: 10
Mac OSX 10.9.5 ... App compiles, runs from IDE ok; however 'Run to cursor' is greyed out, while 'Step Into / over' are enabled. How to fix?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4797
    • wiki
Re: Laz 1.8 with gdb 6.3 'step over' is enabled, but 'Run to Cursor' is not
« Reply #1 on: December 17, 2017, 03:19:40 am »
You mean before you start your app? (as in opposite to, when your app is paused)?
That is normal behaviour.(for all platforms)

Older versions of Lazarus did not disable "run to cursor", but it did not work anyway.

"Run to cursor" is not exactly what you may expect.

It only works within a given procedure.

It stops at the cursor line, if and only if the line is reached in the same stack frame in which you started "Run to cursor".
(It also stops, if the current function is exited without the line having been reached)

If you have not yet started the debugger, then there is no current function, so it does not work (it would do the same as just "run")

For what you probably want to do, just set a breakpoint (F5) and run (F9)

RonQ

  • New member
  • *
  • Posts: 10
Re: Laz 1.8 with gdb 6.3 'step over' is enabled, but 'Run to Cursor' is not
« Reply #2 on: December 18, 2017, 02:20:14 am »
have trouble with generating debug info, may be? Attached a screenshot of the error info - expanded. Checked Laz > Project Options; attached screen shot.
Using Mac OSX 10.9.5
using :  GNU gdb 6.3.50-20050815 (Apple version gdb-1344) (Fri Jul  3 01:19:56 UTC 2009)
Copyright 2004 Free Software Foundation, Inc.

tnx

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4797
    • wiki
Re: Laz 1.8 with gdb 6.3 'step over' is enabled, but 'Run to Cursor' is not
« Reply #3 on: December 18, 2017, 04:21:31 am »
Your settings are correct.

Make sure you set "Optimization" to 0. (Off)
See: http://wiki.lazarus.freepascal.org/Debugger_Setup#Project_Options

---------------------------
It is normal that "Run to cursor" is disabled.

It changes to enabled, when you have done "Run". Then you pause at a breakpoint.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus