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

tealdbg: listen on specified address #1977

Merged
merged 1 commit into from
Mar 17, 2021

Conversation

algorandskiy
Copy link
Contributor

Summary

Fix for #1809

Test Plan

Updated tealdbg e2e test

@algorandskiy algorandskiy self-assigned this Mar 16, 2021
@algorandskiy algorandskiy linked an issue Mar 16, 2021 that may be closed by this pull request
Copy link
Contributor

@tsachiherman tsachiherman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How's about replacing it with an endpoint, so it would be more consistent with the rest of the platform ? I know that it will break backward compatibility though..

@algorandskiy
Copy link
Contributor Author

--remote-debugging-port is here to have chrome-like option so that one can use VSCode's CDT plugin to drive debugging and have VSCode as UI.

@tsachiherman tsachiherman merged commit 0505b9b into algorand:master Mar 17, 2021
@fabrice102
Copy link
Contributor

I have checked on macOS. This worked for me by doing the following:

  1. open the port 9392 in sandbox in Dockerfile.yml
  2. inside sandbox (./sandbox enter algod), run:
    tealdbg debug --remote-debugging-port 9392 --listen "" a.teal
  3. visit devtools://devtools/bundled/js_app.html?experiments=true&v8only=false&ws=127.0.0.1:9392/7d35cd8846288e164178efed7123a00efd0af5d906fed89b1c42fcc7593e3a7d instead of the URL displayed by tealdbg (i.e., adding 127.0.0.1 after ws=)

Note: I've tried to use the IP address 172.18.0.3 of the container instead of "" for listen (IP got by docker inspect -f '{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' algorand-sandbox-algod, that matches ifconfig inside the sandbox docker container). This works when visiting devtools://devtools/bundled/js_app.html?experiments=true&v8only=false&ws=127.0.0.1:9392/7d35cd8846288e164178efed7123a00efd0af5d906fed89b1c42fcc7593e3a7d but not when visiting devtools://devtools/bundled/js_app.html?experiments=true&v8only=false&ws=172.18.0.3:9392/7d35cd8846288e164178efed7123a00efd0af5d906fed89b1c42fcc7593e3a7d, things seem to work but the source code does not appear.
So I don't know.

TLDR: Improve significantly the current state of the art. People need to manually fix the URL displayed by tealdbg, but it's quite painless. And fixing that in the code seems complex and not necessary.

tsachiherman added a commit to tsachiherman/go-algorand that referenced this pull request Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Investigation] Allow tealdbg to listen to any address
3 participants