0

enter image description here

I am building a Google Maps app and I was wondering at which stage of the program this specific implementation gets run and where can I check/see that in Xcode? With their arguments as well.

konyv12
  • 716
  • 2
  • 8
  • 23

2 Answers2

1

If you want to see which all methods are calling a particular method in your project, just click on that method name and select the Related items button(Four square icon) in the xcode and then choose callers
screenshot

If you want to check it While running the code, then put a breakpoint in the method and check the call stack.

mfaani
  • 33,269
  • 19
  • 164
  • 293
ron27
  • 181
  • 14
  • Thanks. How can the call stack give useful information to me? I just looked at it, and they are just basically a list of names | when I check their memory location it's empty (0x0). Is there no 'terminal' or something that lists simply the names of functions with their specific arguments that get called at any milisecond or something? Would be much easier to interpret. – konyv12 Apr 04 '17 at 13:22
  • @konyv12 you should *only* click on the darker lines of the callstack. Don't click on the lighter lines. They won't convey much of a meaningful value. Additionally see [here](http://stackoverflow.com/questions/3580715/what-is-the-difference-between-step-into-and-step-over-in-the-eclipse-debugger), you can use the **step in** & **step out** from [Xcode debugging](https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/debugging_with_xcode/chapters/debugging_tools.html) – mfaani Apr 04 '17 at 13:29
  • Since I guess it's a delegate method, it should use a breakpoint and check the call stack. The first way is interesting (I use it everyday), but in that kind of case, it may be useless. – Larme Apr 04 '17 at 13:34
0

The method that you are looking for is a delegate method of the Google Maps SDK.

Here is a reference to the GMSMapViewDelegate: https://developers.google.com/maps/documentation/ios-sdk/reference/protocol_g_m_s_map_view_delegate-p

You can read here about this particular method.

Basically this method will be called whenever a user drags a marker on the map view.

To debug, put a breakpoint inside the method and then drag a marker on the mapview

Shayan Jalil
  • 588
  • 5
  • 17