• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Debugger doesn't stop in template method?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugger doesn't stop in template method?


  • Subject: Re: Debugger doesn't stop in template method?
  • From: Kevin Grant <email@hidden>
  • Date: Tue, 13 Jan 2004 20:27:28 -0600

I have a template class. . . . .

If I set a breakpoint inside that function the debugger doesn't stop. (It doesn't warn me in the console that it couldn't set the breakpoint either.)

The file does have debug info - if I stop in doSomething I can step until it exits and back up into Foo::Bar.

Is this a known problem? Is there a workaround? (Do I need to build a sample project that shows the problem and write up a radar issue?)


I can see why it might not allow this; a template has no real code until it is instantiated, so there are an infinite number of breakpoints you could be asking for. Theoretically the IDE could figure out all the ways you've ever instantiated that template and ask you which instance you want the breakpoint in, but I've never seen anything that does this.

Instead, you'll have to find a place where the template is actually used, and use breakpoints there. Or, use other debugging techniques within the code in the template.

Or, if you create template specializations (that is, code that is unique when a template is instantiated in a particular way), perhaps you can set a breakpoint in the specialized template code because it should be sufficiently unique.

Kevin G.
http://homepage.mac.com/kmg/
mail to kevin at ieee dot org
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Debugger doesn't stop in template method?
      • From: Andreas Grosam <email@hidden>
References: 
 >Debugger doesn't stop in template method? (From: Jim Correia <email@hidden>)

  • Prev by Date: Re: Finding undefined symbols
  • Next by Date: Re: Debugger doesn't stop in template method?
  • Previous by thread: Re: Debugger doesn't stop in template method?
  • Next by thread: Re: Debugger doesn't stop in template method?
  • Index(es):
    • Date
    • Thread