Skip to content

How do I debug native packages? #367

@flimzy

Description

@flimzy

I'm trying to tinker with the GopherJS implementation of runtime.go, to flesh out the Callers() method, which is needed by a third party package I want to use.

I'm having a heck of a time debugging, though. I haven't found the "secret sauce" to make my changes to GopherJS's ./compiler/natives/runtime/runtime.go file effectual for my third-party packages.

There must be a simple step I'm overlooking.

I've tried (within the gopherjs checkout):

go clean; go build; go install

This successfully updates the gopherjs binary, but doesn't seem to (always?) update the native packages.

In my third party package, I've attempted

go clean; gopherjs test

But that also has no effect, as demonstrated by utterly breaking runtime.go by introducing obvious typos... But the tests still execute, with no compilation failure.

Clues?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions