Back to "XmlTextReader bizarre and fustrating bug...well not really a bug..."

This is a viewer only at the moment see the article on how this works.

To update the preview hit Ctrl-Alt-R (or ⌘-Alt-R on Mac) or Enter to refresh. The Save icon lets you save the markdown file to disk

This is a preview from the server running through my markdig pipeline

Imported mostlylucidcouk

XmlTextReader bizarre and fustrating bug...well not really a bug...

Wednesday, 30 June 2004

Had this odd issue working on some code which uses XmlTextReader to pass through an XML string...basically, when I ran the code noemally, it worked every time, but when I ran in debug mode it would read the first node and skip all others. Well, this drove me nuts, I wrote a bunch of test code etc...in the end another developer here noticed than I had the ReadOuterXML() method in my Watch debug window...well, that was the problem - never assume that the Watch window is passive - by calling the ReadOuterXML method, I was skipping all the nodes causing the issue.

logo

© 2025 Scott Galloway — Unlicense — All content and source code on this site is free to use, copy, modify, and sell.