I am debugging a VB 6.0 program that is using XML methods, etc... so I wish to be able to see how these XML variables in my program look like when I am debugging it ... How can I do that?
+2
A:
Use watch window (view menu -> watch window or locals window) or immediate window, when you are debugging or hit a breakpoint.
Inside immediate window ( ctrl + g ), type ? myXmlVariable
to see the content of the variable named myXmlVariable
.
shahkalpesh
2010-06-11 14:29:40
Ok, good Call,... I will use the Watch window...The Immediate Windows does not work that way.. gives error.. I wish there was a way that I could type my XML variable in it and then it could show the XML structure for it ... that is what I am looking for ...
BDotA
2010-06-11 14:38:53
You will have to type in a property name or a method that returns a value. for your example, it can be `Debug.Print oNode.InnerXml` where `InnerXml` is the property of the node. In the immediate window, you will have to type `? oNode.InnerXml`. From what I know, there is no XML visualizer available for VB6 IDE.
shahkalpesh
2010-06-11 14:58:58
+1
A:
you can also use "Debug.Print myXmlVariable" in the code and it will automatically write to the immediate window as it encounters the code during run time or as you are stepping through it.
jasonk
2010-06-11 14:38:06
Thanks, I tried it now .. again it gives error" Object does not support this method "..or something like that ------------ Dim oNode As IXMLDOMNode Set oNode = XMLNewChildNode(oParent, sName, oParent.namespaceURI) Debug.Print (oNode)
BDotA
2010-06-11 14:42:55
you can't use it to print the "object" of onode, you have to output a property. e.g. "Debug.Print oNode.InnerXml" or "Debug.Print oNode.Value"
jasonk
2010-06-11 15:06:05