# ScriptDebugger: Inspect values of ref variables

**URL:** https://forum.alternetsoft.com/t/scriptdebugger-inspect-values-of-ref-variables/96
**Category:** AlterNET Studio Support
**Tags:** scripter
**Created:** [November 6, 2019, 12:00am UTC](https://forum.alternetsoft.com/t/scriptdebugger-inspect-values-of-ref-variables/96 "2019-11-06T00:00:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![christof.hirndler](https://forum.alternetsoft.com/letter_avatar_proxy/v4/letter/c/606060/32.png) [@christof.hirndler](https://forum.alternetsoft.com/u/christof.hirndler)
#### Post date: [November 6, 2019, 12:00am UTC](https://forum.alternetsoft.com/t/scriptdebugger-inspect-values-of-ref-variables/96/1 "2019-11-06T00:00:00Z")

</div>

Hello,  
when I try to inspect the value of a ref variable I get the following exception:  
"Exception occured: InvalidCastException, Unable to cast COM object of type 'System.\_\_ComObject' to interface type 'Microsoft.Samples.Debugging.CorDebug.NativeApi.ICorDebugStringValue'.  
This operation failed because the QueryInterface call on the COM component for the interf"ace with IID '{XXXX}' failed due to the following error:  
Schnittstelle nicht unterstützt (Exception from HRESULT: 0x80004002 (E\_NOINTERFACE))."  
The problem can be easily reproduced in the script debugger demo.  
Samle code, breakpoint at line 25 (val = 20;):  
using System;  
using System.Linq;  
using System.Collections.Generic;  
namespace DebuggerTest   
{  
public class Program  
{  
[STAThread]  
public static void Main(string[] args)  
{  
int a = 0;  
int b = 0;  
TestMethod1(ref a);  
TestMethod2(ref b);  
}  
static void TestMethod1(ref int val)  
{  
val = 10;  
}  
static void TestMethod2(ref int val)  
{  
val = 20;  
}  
}  
}

---

<div class="post-metadata">

### Author: ![andrew.medvedev](https://forum.alternetsoft.com/user_avatar/forum.alternetsoft.com/andrew.medvedev/32/28_2.png) [@andrew.medvedev](https://forum.alternetsoft.com/u/andrew.medvedev)
#### Post date: [November 7, 2019, 12:00am UTC](https://forum.alternetsoft.com/t/scriptdebugger-inspect-values-of-ref-variables/96/2 "2019-11-07T00:00:00Z")

</div>

Hello,  
Thank you for the bug report.  
This is a known issue which we already fixed.  
We will include this fix to the next release and happy to provide a hot fix if needed.  
regards,  
Andrew

---

<div class="post-metadata">

### Author: ![christof.hirndler](https://forum.alternetsoft.com/letter_avatar_proxy/v4/letter/c/606060/32.png) [@christof.hirndler](https://forum.alternetsoft.com/u/christof.hirndler)
#### Post date: [November 7, 2019, 12:00am UTC](https://forum.alternetsoft.com/t/scriptdebugger-inspect-values-of-ref-variables/96/3 "2019-11-07T00:00:00Z")

</div>

Thanks for quick the answer.  
When will the new version be released?

---

<div class="post-metadata">

### Author: ![andrew.medvedev](https://forum.alternetsoft.com/user_avatar/forum.alternetsoft.com/andrew.medvedev/32/28_2.png) [@andrew.medvedev](https://forum.alternetsoft.com/u/andrew.medvedev)
#### Post date: [November 8, 2019, 12:00am UTC](https://forum.alternetsoft.com/t/scriptdebugger-inspect-values-of-ref-variables/96/4 "2019-11-08T00:00:00Z")

</div>

Hello,  
This is going to be a major release, so we're looking at first quarter of 2020.  
regards,  
Andrew
