Recent

Author Topic: [Solved] Find the callings of a procedure.  (Read 2911 times)

Edson

  • Hero Member
  • *****
  • Posts: 1302
[Solved] Find the callings of a procedure.
« on: April 08, 2017, 11:48:36 pm »
Is there a way to see (using Lazarus) in which points of the code a procedure or method is called ?

I, frequently, want to see the effects of modify a method, and I don't want to search in all the files of the project.


Thanks.
« Last Edit: April 09, 2017, 06:12:39 am by Edson »
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Find the callings of a procedure.
« Reply #1 on: April 09, 2017, 12:47:01 am »
I don't want to search in all the files of the project.

Why not?
If you click on the method name and then Search->Find in Files... and click the radiobutton "search all files in project" you get an instant list which includes all the places at which that method is called. The list is persistent, and you can jump to any of the listed locations with a single click.

Edson

  • Hero Member
  • *****
  • Posts: 1302
Re: Find the callings of a procedure.
« Reply #2 on: April 09, 2017, 01:55:41 am »
If you click on the method name and then Search->Find in Files... and click the radiobutton "search all files in project" you get an instant list which includes all the places at which that method is called. The list is persistent, and you can jump to any of the listed locations with a single click.

Yes. But it's like using Find in Files ... It just compares strings, it will find any string including comments, or methods of another object with the same name.

I want to find just the points of the code where a specific method of a specific class is called.
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9908
  • Debugger - SynEdit - and more
    • wiki
Re: Find the callings of a procedure.
« Reply #3 on: April 09, 2017, 04:37:59 am »
Use "Find identifier references" (you can find it in the context menu).
http://wiki.lazarus.freepascal.org/Lazarus_IDE_Tools#Find_Identifier_References

Edson

  • Hero Member
  • *****
  • Posts: 1302
Re: Find the callings of a procedure.
« Reply #4 on: April 09, 2017, 04:55:42 am »
Thanks Martin, it works OK, but I see, it still marks the references in comments.

EDIT: I see there is an option to deactivate find in comments.  :D.

« Last Edit: April 09, 2017, 06:12:19 am by Edson »
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

 

TinyPortal © 2005-2018