You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm using this lib to developing a tool, but I encountered an error, then I tried copy codes to my golang project and then tried to set breakpoints into golang codes.
But breakpoints doesn't work, how could I implement this ? or, If I want to contribute to this lib, how to debug this lib locally with VSCode (because it could not be launched when this settings are put into .vscode/settings.json)
Looks like I misunderstood your initial post. There exist some web assembly debugging tools in chrome devtools. Apart from that, there's an issue in golang/go (golang/go#33503) which mentions source map support, and there might be more related to this if tinygo fits the bill for you. Otherwise, I'm not sure if there's realistically much can be done with this library specifically, as it's goal is mainly to be the bridge/glue between the 'Go' land and the 'JS' land.
yeah, if DWARF implemented then debugging could be possible with Chrome devtools, currently I'm switching compile target and mock input from JS to debug breakpoints. Thanks a lot !
Hi, I'm using this lib to developing a tool, but I encountered an error, then I tried copy codes to my golang project and then tried to set breakpoints into golang codes.
But breakpoints doesn't work, how could I implement this ? or, If I want to contribute to this lib, how to debug this lib locally with VSCode (because it could not be launched when this settings are put into .vscode/settings.json)
"go.toolsEnvVars": {
"GOARCH": "wasm",
"GOOS": "js",
},
Thanks a lot.
The error was:
panic: syscall/js: call of Value.Invoke on undefined
goroutine 1 [running]:
syscall/js.Value.Invoke(0x0, 0x0, 0x42ac80, 0x1, 0x1, 0x10, 0x10)
syscall/js/js.go:417 +0xa
yam.plus/example-go-plugin/wasm.toJSFunc(0x14060, 0x333f8, 0x13, 0x0, 0x0)
yam.plus/example-go-plugin/wasm/function.go:30 +0xf
yam.plus/example-go-plugin/wasm.ToJSValue(0x14060, 0x333f8, 0x98, 0x1)
yam.plus/example-go-plugin/wasm/reflect_to.go:64 +0x2d
yam.plus/example-go-plugin/wasm.mapToJSObject(0x153e0, 0x424210, 0x15, 0x0, 0x0)
yam.plus/example-go-plugin/wasm/reflect_to.go:129 +0x54
yam.plus/example-go-plugin/wasm.ToJSValue(0x153e0, 0x424210, 0x0, 0x0)
yam.plus/example-go-plugin/wasm/reflect_to.go:66 +0x34
yam.plus/example-go-plugin/wasm.Object.Set(0x7ff800010000000d, 0x410040, 0x2f03b, 0x1a, 0x153e0, 0x424210)
yam.plus/example-go-plugin/wasm/object.go:121 +0x2
yam.plus/example-go-plugin/wasm.Expose(...)
yam.plus/example-go-plugin/wasm/wasm.go:42
main.main()
command-line-arguments/main.go:40 +0x7
The text was updated successfully, but these errors were encountered: