Theseus and Express.js generated project?

44 views
Skip to first unread message

Maciej Klimas

unread,
Jul 24, 2014, 7:13:27 PM7/24/14
to theseus...@googlegroups.com
I've generated Express.js project with Stylus and Jade support, changed package.json to use theseus

    "start": "node-theseus --theseus-verbose ./bin/www"


and console output from brackets.io with addon Node.js bindings option "Run as npm start" is

> myappexpressg@0.0.1 start D:\node\testxpress\myappexpressg
> node-theseus --theseus-verbose ./bin/www


[node-theseus] adding require() instrumentation hook
[node-theseus] listening for WebSocket connections on port 8888
[node-theseus] instrumenting D:\node\testxpress\myappexpressg\bin\www ...
[node-theseus] instrumenting D:\node\testxpress\myappexpressg\app.js ...
[node-theseus] instrumenting D:\node\testxpress\myappexpressg\routes\index.js ...
[node-theseus] instrumenting D:\node\testxpress\myappexpressg\routes\users.js ...
[node-theseus] debugger connected



but then, after using "Live preview/Development mode" I'm getting an error to open HTML file for dynamic preview and finally theseus is not working at all. 
Jade is compiled to html and that might be a problem, but any way to get it working with current project setup?

Tom Lieber

unread,
Jul 25, 2014, 12:57:57 PM7/25/14
to Maciej Klimas, theseus...@googlegroups.com
After “debugger connected” you should see call counts next to the functions in your server code, as long as your server code is plain JavaScript. Do you?

To see the call counts for the client-side code, make sure Theseus is in Proxy mode. It shouldn’t matter that the HTML is rendered from Jade, but the JavaScript needs to be in <script> tags or in .js files (not bundled together or modified in any way from how they are on disk). Are all those conditions met?



--
You received this message because you are subscribed to the Google Groups "Theseus Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theseus-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Tom Lieber
http://AllTom.com/
http://infinite-sketchpad.com/

Maciej Klimas

unread,
Jul 27, 2014, 2:19:53 PM7/27/14
to theseus...@googlegroups.com, mes...@gmail.com
Seems it fixed itself with reinstall of extension and brackets editor using same project. No idea what was really the cause. Works both ways from "Serve from local" and "Proxy" modes. Thanks for great addon.
Reply all
Reply to author
Forward
0 new messages