Skip to content

No stack trace when panic happens in WASM #4444

@mymmrac

Description

@mymmrac

TinyGo v0.32.0

Simple example:

package main

func main() {
	panic("test")
}

When compiled with regular Go (GOOS=js GOARCH=wasm) and run in browser console looks like this:

panic: test
<empty string>
goroutine 1 [running]:
main.main()
	/<path-to-file>/main.go:4 +0x2

But when compiled with TinyGo (-target wasm) it looks like this:

panic: test

How to get full stack trace of panic when using TinyGo?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions