Question

I'm developing an angularjs app that consumes its info from a REST service. Besides that, there is a lightweight Node serve that only serves static content.

As I'm trying my feet with the Brackets editor I would like to debug my app using the Theseus debugger, but I'm failing.

In this scenario, is it feasible to debug using Brackets/Theseus?

How can I configure the editor in order to have my app running intermediate by it?

Was it helpful?

Solution

Make sure Theseus is in the right mode. For an angular app one should do the following: Click File > Mode: Proxy to localhost:3000 (experimental). I use a nodejs server running on port 3000, this server is serving my angularjs app. Make sure you don't have a "Live Preview Base URL" in your Project Settings. Check by clicking the File > Project Settings... menu item in Brackets. Having a Base URL causes Brackets and Theseus to try to proxy requests and things don't seem to work right. However, Theseus has limited support for proxying on its own as long as your server listens on localhost:3000. Click the menu item File > Mode: Proxy to localhost:3000 (experimental) and remove the Brackets Base URL setting. Click on the html file containing the home page of your angular app and click the lightning bolt in the top right corner of the window. Now everything should work.

OTHER TIPS

Are you looking to debug just the JS code running on the browser side? Or are you trying to use Theseus on the REST server's code at the same time? (And there's no code you're interested in on the Node side, right?)

Are you following the official Theseus instructions?

When you say it's failing, providing more specifics might help. Do you see an error message? Etc.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top