On Wed, Nov 21, 2012 at 4:07 PM, <net...@gmail.com> wrote: > In VS2010 you can have symbols in your watch window that are in an > anonymous namespace and you can put breakpoints on them. For example: > > namespace { > int g = 42; > } > > In your Watch window, add g, and you can see 42. > > If you have an anonymous namespace inside of another namespace, then they > are not easy to see in your watch window.
Actually that seems quite easy. For example in FrameLayerBuilder.cpp I can add gMaskLayerImageCache to the watch window with no problems, even though it's in mozilla::{anonymous namespace}. Maybe it being static as well helps? > But you can still put breakpoints on them. > I don't know how. For example, I don't know how to set a breakpoint by name on GetMaskLayerImageCache, or ContainerState::ProcessDisplayItems. I have to open up the source file and click on a line. I also don't know how to cast to a ContainerState* in the expression evaluator. That case is not very common though. > Yes, non-toplevel anonymous namespaces do seem to be rare. Unfortunately that doesn't seem to help me, e.g. I don't know how to set breakpoints by name on methods of CSSParserImpl, which is in a toplevel anonymous namespace. Nor can I cast to a CSSParserImpl* in the expression evaluator. Rob -- Jesus called them together and said, “You know that the rulers of the Gentiles lord it over them, and their high officials exercise authority over them. Not so with you. Instead, whoever wants to become great among you must be your servant, and whoever wants to be first must be your slave — just as the Son of Man did not come to be served, but to serve, and to give his life as a ransom for many.” [Matthew 20:25-28] _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform