# Assistance on debugging issue win\_xml

**URL:** <https://forum.ansible.com/t/assistance-on-debugging-issue-win-xml/30947>\
**Category:** Ansible Developer\
**Tags:** windows\
**Created:** [August 5, 2019, 3:00am UTC](https://forum.ansible.com/t/assistance-on-debugging-issue-win-xml/30947 "2019-08-05T03:00:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Picante](https://avatars.discourse-cdn.com/v4/letter/p/43a26b/32.png) [@Picante](https://forum.ansible.com/u/Picante)\
**Post date:** [August 5, 2019, 3:00am UTC](https://forum.ansible.com/t/assistance-on-debugging-issue-win-xml/30947/1 "2019-08-05T03:00:11Z")

</div>

Hi,  
I am having some issues using the win\_xml module, I am hoping to do a bit more troubleshooting.  
I tried to follow some of the instructions of the following link but i wasn’t successful in setting up a debugging environment.  
[https://docs.ansible.com/ansible/latest/dev\_guide/developing\_modules\_general\_windows.html#windows-debugging](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_windows.html#windows-debugging)

I have a reasonable amount of experience with powershell, I was hoping to try and debug things in powershell, but couldn’t get myself setup, any help would really be appreciated.  
Thanks.

PLAYBOOK

- name: update xml (???Working)  
win\_xml:

# path: “{{dest\_instances\_content\_base\_path}}\instance\_ver.xml”

path: c:/temp/ls/Instances/Default/instance\_ver.xml  
xpath: /configuration/runtime/assemblyBinding/dependentAssembly/bindingRedirect  
fragment: ‘86.10.8.0’  
attribute: newVersion  
type: attribute

instance\_ver.xml (content)

OUTPUT:

Using module file /usr/local/lib/python2.7/dist-packages/ansible/modules/windows/win\_xml.ps1  
Pipelining is enabled.  
\<WIN-2016AAA.dom.co.nz\> ESTABLISH WINRM CONNECTION FOR USER: Administrator@DOM.CO.NZ on PORT 5985 TO WIN-2016AAA.dom.co.nz  
EXEC (via pipeline wrapper)  
The full traceback is:  
You cannot call a method on a null-valued expression.  
At line:204 char:5

- [bool]$add = !$node.HasAttribute($attribute) -Or ($node.$attribut …
- 

```auto

```

- CategoryInfo : InvalidOperation: (🙂 , ParentContainsErrorRecordException
- FullyQualifiedErrorId : InvokeMethodOnNull

ScriptStackTrace:  
at , : line 204

fatal: [WIN-2016AAA.dom.co.nz]: FAILED! =\> {  
“changed”: false,  
“msg”: “Unhandled exception while executing module: You cannot call a method on a null-valued expression.”  
}
