首页 > 解决方案 > WebAssembly: is there a way to debug/inspect the stack?

问题描述

Is it possible to inspect the stack while a function is running, or after it trapped? I know this can be achieved by running custom interpreters, but I wonder if this is possible in the default browser environment.

标签: stackwebassembly

解决方案


是的你可以。Chrome 和 FireFox 中的调试工具都允许您对 wasm 模块进行断点。它们还允许您通过以 WebAssembly 文本格式呈现二进制模块来检查它们的内容。

当代码通过断点停止时,您可以看到调用堆栈、局部变量等...


推荐阅读