tags:

views:

88

answers:

2

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
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
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
+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
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
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