theseus icon indicating copy to clipboard operation
theseus copied to clipboard

Debugging remote node.js apps

Open freak4pc opened this issue 11 years ago • 4 comments
trafficstars

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

freak4pc avatar Apr 02 '14 11:04 freak4pc

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.

alltom avatar Apr 02 '14 16:04 alltom

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.

bcoates avatar Jul 26 '14 01:07 bcoates

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. :)

alltom avatar Jul 26 '14 01:07 alltom

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

matthiasg avatar Mar 12 '15 14:03 matthiasg