How to debug managed and native code at the same time on Windows Phone 8.1?

Hi everyone, I am Chinese, so my english is poor.
I develop a plugin for Unity, is automatic translate c# to js then run js for achive dynamic update like lua. But it had a bug on Windows Phone 8.1, I need debug managed and native code at the same time, but when I choose

then debug, it show
2653295--186977--QQ截图20160528220112.jpg

The bug is overflow, it occur in when native layer call managed layer’s bridge return. But the plugin is work fine on Android and IOS!!! So I think the bug is in Windows Phone 8.1 memory management or SpiderMonkey’s Windows Phone 8.1 lib or my native code, but I am not sure, so I need debug at same time.
If I choose managed code or native code to debug, it can run good, but I cannot find problem from debug managed code or native code only, anyone can help me?

我单独调试c代码的时候发现这个bug是在c层调c#层返回的时候,由于堆栈溢出导致写崩。但是这个插件在Android和iOS上运行的很好(目前为止没出现Windows Phone8.1上这种连加载都过不去的情况),我首先可能是由于Windows Phone8.1本身,或者是Spider Monkey的库有问题,但是我用的SpiderMonkey的库,就是从cocos2d-js里拿出来的,唯一不同的是在cocos2d-js里没有c#里的委托,而我的问题,就出现在委托里!如果js里带委托,那么这里就有一个连环调用,c# → 带有委托的js(委托里还需要调c#) → c# → js的委托 → c#,现在问题就出现在调js的委托时,再回调c#就崩溃(我想到这里也会糊涂一会),所以我也怀疑问题出在我的c代码里。

From the first glance it sounds like call-convention mismatch.
On Windows the default convention is stdcall, make usre you use that in all entry points in your native code (exported functions and function callbacks to managed code). The alternative is to explicitly specify call convention in the managed code.

You cannot debug both managed and native code on ARM at the same time - VS does not implement it. You can, however do that on x86. There are no x86 windows phone devices on the market, but you should be able to do your debugging on the emulator, which is x86.

Thank you.

Thank you. I try to see.