adobe-research / theseus

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

Will this work with Meteor.js #74

Open fbracht opened 9 years ago

fbracht commented 9 years ago

Meteor.js does its own "Live Preview" thing on localhost:3000, so Bracket's Live Preview doesn't work for Meteor projects. Will Theseus work?

mesosteros commented 9 years ago

Bracket's Live Preview does work with Meteor projects. Simply start the Meteor project as usual on the console and then in Brackets go to File > Project Settings and put the http://localhost:3000/ as the url for the Live Preview. You should also have an option in File menu that switches from "Mode: Serve files from disk" to "Mode: Proxy to localhost:3000". Theseus however does not work yet with this (at least on my end). We should always keep in mind that Meteor runs on both Client and Server sides, so you need to debug them in separate. There already are a couple of videos on the You Tubes about that, but they use the browser's console and developer tools.

fbracht commented 9 years ago

Thanks for the clarification, very much appreciated. :)

fbracht commented 9 years ago

If you'll allow me one follow-up question to that, @mesosteros, I did as you said, but the live preview still doesn't work. It seems to require an index.html, which I don't have on my project. (Since Meteor.js doesn't require one, I prefer to have all files named after their content.) Is it really required?

mesosteros commented 9 years ago

It's a small bug but it should work nonetheless if you open the live preview when you have the html file with the head tag, open (i don't know if you're using iron router so i'm just pointing to the head). I can perfectly use it despite this small bug.

alltom commented 9 years ago

I don't think Theseus will work with Meteor.js code, on the server, or in the browser. :(

Meteor.js has its own program for running the server code that doesn't work with Theseus yet. You can try using Theseus in Proxy mode like @mesosteros described, but I don't think the code that runs in the browser is the same as the code that's on disk (I think Meteor modifies it somehow), so Theseus won't be able to tell which functions are executing.

I'd really like to accept patches that make it work! Or instructions on how to get it to work if it does happen to already. :)

BTW, to be able to launch Live Development, it is enough to create an HTML file with nothing in it and use that to start the server. It doesn't have to be called index.html, but Brackets will append the file name to the server URL you give it, so it helps if its name also makes a valid URL.