Status

For bugs in Firefox DevTools, the developer tools within the Firefox web browser. This includes issues about the user interface of the toolbox, special pages such as about:debugging and about:devtools, and developer-related APIs.

I noticed a problem in Firefox ESR 45. It also happens in Nightly 55.
When inspecting element in browser UI, sometimes the element isn't selected in markup. Here's how to reproduce the bug:
1. Create pref dom.allow_XUL_XBL_for_file as true. Set pref devtools.inspector.showAllAnonymousContent to true.
2. Open attached .html page.
3. Press Ctrl+Shift+C and inspect text "123" on the page.
Result: There's no specific element selected in markup
Expected: <pre> element should be visible and selected in markup
The bug has two implications:
1) If I simply clicked on the page to get a neighboring element, to scroll it into view in markup, it fails.
2) If I actually want to inspect the element, then I have to reopen inspector.

Did some debugging on this. As best as I can tell, if you manually expand the markup view to the XBL anon content it works fine. When it breaks is when you 'pick the element' with the highlighter. Not only does it not pick the node, but it makes it so you can't expand the <test> node (unless if it was expanded previously).
This is because we hit a case where the parent is unknown, so a standin is created (https://dxr.mozilla.org/mozilla-central/source/devtools/shared/fronts/inspector.js?q=%27%22standin%22%27&redirect_type=single#559). The WalkerFront appears to keep that standin without it ever being written to, as the comment expects. I believe this is because the markup view never ends up requesting for children on the parent (which is not a problem with non XBL content that hits the same case, like the <foo> in: data:text/html,<div><foo><span>foo</span></foo></div>). Or at least, the 'write' call in protocol.js does fire for the NodeActor in HTML case and not for the XBL case.
Also: if I set some padding on the parent to <children /> such that the parent gets picked before the child when highlighting things also work.