adobe-research / theseus

A pretty darn cool JavaScript debugger for Brackets
Other
1.34k stars 69 forks source link

Debugging remote node.js apps #54

Open freak4pc opened 10 years ago

freak4pc commented 10 years ago

Is it possible debugging a remote Node.JS app instead of a local one ?

alltom commented 10 years ago

Yes. The main challenges are:

  1. Theseus connects to localhost by default. There's no preference to change that yet.
  2. Theseus expects paths to match pretty much exactly. node-theseus would report full paths from the server and Brackets reports full paths on your local machine. Actually, I have hazy memory of making Theseus check partial paths, but I can't remember atm. :)

I'd love to help get this working, though. The easiest way to test would be for you to use an SSH tunnel to map localhost:8888 (TCP, I believe) on your dev machine to localhost:8888 on your server. Can you try that and see how well that works? May as well invoke node-theseus with --theseus-verbose=2.

bcoates commented 10 years ago

Forwarding 8888 works well enough to be usable, though it looks like the file matching fails in places. A preference to connect to a non-localhost site would be great.

alltom commented 10 years ago

Your +1 has been received. :)

Hmm, yeah, file matching is somewhat hacked-together because there are a lot of cases to deal with (Rails asset conventions, Node.js public/ convention, symlinks, etc).

If you could post some of the paths that aren't getting mapped correctly, I might be able to make couldBeRemotePath() lenient enough to accept them. :)

matthiasg commented 9 years ago

This is indeed the most interesting aspect. We would love to use Theseus to remotely debug server code we develop on the client side.