Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The counter example, with Dwarf debugging (breakpoints, single stepping in vscode and the browser) #2563

Merged
merged 6 commits into from May 11, 2024

Conversation

Hecatron
Copy link
Contributor

Hi,
I've recently been looking into if it's possible to single step / debug wasm rust within the browser or vscode
It turns out it is possible although there doesn't seem to be much in the way of examples or documentation on getting it to work.

So I've put together an example of the counter that also can do debugging.

  • Readme lists what's needed to get it to work.
  • index.html modified slightly.
  • I've included examples for the .vscode files for this one since it's main focus is on how to get debugging to work easily

So far I've only really tried this under the windows environment.

@gbj
Copy link
Collaborator

gbj commented May 8, 2024

Cool! I am wondering if this belongs in examples or in projects — I am trying to move more things into projects over time because the maintenance burden for examples is too high with the number we have in there right now, but it's great to be able to point to things saved somewhere.

@Hecatron
Copy link
Contributor Author

Hecatron commented May 8, 2024

I've now moved this to projects, it's not perfect in that you can add breakpoints within chrome and visual studio code which is pretty cool, but so far I can't see what's inside variables with the example setup (so no variable inspection).

@gbj
Copy link
Collaborator

gbj commented May 11, 2024

Awesome — Thanks! The write-up in the README is really helpful.

@gbj gbj merged commit 7c5203d into leptos-rs:main May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants