❔ visual studio debugger skipping chunks of code
Hello there, when I step through my code with F11, where it's marked in green is where it stops and goes straight to another method entirely, skipping everything inbetween. I've made sure I'm in debug mode, optimize code is unchecked, i've tried restarting, cleaning and rebuilding and nothing seems to work.
While running the program normally nothing within the marked foreach statement seems to be working either.
12 Replies
that can happen if the bodylist is a 'generator' enumerable
what happens if you change
node.SelectNodes(...)
to nodes.SelectNodes(...).ToList()
?
if the whole foreach is skipped, then bodyParts
will be emptyhm, I can't to .ToList() i'm getting "'XmlNodeList' does not contain a definition for 'ToList' and no accessible extension method 'ToList' accepting a first argument of type 'XmlNodeList' could be found (are you missing a using directive or an assembly reference?)"
using system.linq
that's there already ._.
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
that's fair, give me a minute lol
https://github.com/Wicked-Cat/StoryRPG the cropped bit is from BodyFactory
GitHub
GitHub - Wicked-Cat/StoryRPG
Contribute to Wicked-Cat/StoryRPG development by creating an account on GitHub.
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
alright so the changes work, but xmlNodesBodyParts's count is 0, I built it the same as the other factory class and those ones work, and the bodies.xml file is built the same from what I can tell so i'm not sure why this is happening.
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
noooo not debugging XD
but hopefully now I can figure out what's actually going on, so thanks sfor the help 🙂
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.