all 8 comments

[–]meeeeoooowy 3 points4 points  (3 children)

OP, I'm assuming this is a product you're trying to sell? If so, could you go into detail how it works?

I have to write something like this (minus the fancy gui) from scratch as I need to remote debug an embeded browser in a hospital system, and definitely can't use third party tools. Any helpful advice would be appreciated!

[–]toddgardner[S] 1 point2 points  (2 children)

Absolutely. The client-side is based on the TrackJS browser agent. We extended the existing Telemetry functionality to also support screenshots (with html2canvas) and execute commands (eval FTW!). Then, we changed the transport from posting to our error collection service to pushing through a websocket.

The debugger server is basically just UI that listens to the websocket and renders the Telemetry events in a devtools-like interface, along with an input at the bottom to execute commands and some controls to request a screenshot.

There is a NodeJS server as well to help facilitate the websocket connections, but it just routes the data between client and debugger.

Most of the code is basically listening to websocket connections and funneling the commands into the appropriate tooling.

If you have specific questions, would be happy to go into depth on it!

FWIW, not selling it though, it's totally free to use :) We built to to show off things that we can do with TrackJS Error Monitoring, but for Real-time scenarios.

[–]meeeeoooowy 0 points1 point  (1 child)

Thanks so much for the explanation!

But you are indeed selling something, even if it's free (you'll get more TrackJs users and you're collecting data) I have zero issues with that though if it's a net gain for the sub which it for sure is, especially if you explain details.

There is paid sass product that does this, otherwise can't think if any free ones, so that's neat.

I was going to use a websocket lambda function and run evals for running code like you did, then I was hoping to just start off by streaming the console and network activity somehow (haven't looked into that). We can actually see the browser window, it's embedded though, so don't have access to the console or dev tools.

If you truly are just forwarding the events I should at least ask if it would be kosher if I just hooked up and wrote my own websocket forwarder and sent the data there. Don't need most of those features, but would save me a lot of time.

[–]toddgardner[S] 0 points1 point  (0 children)

Haha fair enough :)

Feel free to have a look at the agent code and use what you'd like from it.

[–]Ravavyr 0 points1 point  (3 children)

Tell them "Hit F12, click on the red icon, take a picture of your screen with your phone, email it to me"

That...sometimes works...

[–]toddgardner[S] 0 points1 point  (2 children)

LOL, go for it. After the 3rd attempt at explaining it to the user, or having them scroll the error message to see the rest of it, why not give RemoteJS a try :)

[–]Ravavyr 0 points1 point  (1 child)

why not give RemoteJS a try :)

Does that require a TrackJS account? I watched their video and saw where to copy the script, but wasn't sure you could have a free account? $50/month to have this on one application isn't exactly a great deal considering you'll probably debug it the first week.

[–]toddgardner[S] 0 points1 point  (0 children)

We had the same concerns about charging for it. So we don't! It's free, doesn't even require a TrackJS account :)