adobe-research / theseus Goto Github PK
View Code? Open in Web Editor NEWA pretty darn cool JavaScript debugger for Brackets
License: Other
A pretty darn cool JavaScript debugger for Brackets
License: Other
Trying to get up and running with Brackets and Theseus. Brackets Live Preview works but cannot seem to connect with Theseus.
From the logs I see "failed to get tracer instance" / "Reference Error: __tracer is not defined".
I'm not expert on this stuff and tried to sift through the extension and fondue source but couldn't find where it is suppose to instantiate this instance.
I also tried disabling all other extensions but no luck.
OS X 10.9.2
Chrome 34.0.1847.131 (265687)
Brackets 38 (also tried building from source, version 40)
I've just tried to debug Brackets with Theseus (F10, thanks for this great feature!) and ervery time I've done this, I've seen the welcome dialog of Theseus (collecting data, mail, ...). I think this is because Brackets is running "blank" in this mode, but maybe you can fix it (I don't know how to).
Theseus uses some APIs which are deprecated as of Brackets Sprint 34 (the next release):
NativeFileSystem.requestNativeFileSystem()
DirectoryEntry.createReader()
These APIs should continue to work for now (though please test to be sure!). However, the deprecated APIs will be removed around the end of this year, so you should migrate away from them soon.
It should be fairly straightforward to migrate to the new APIs. (And if you release an updated extension requiring the new APIs, users of earlier Brackets versions will still be able to install the older release of Theseus that is compatible with their build).
See this discussion thread for more background on the API changes.
Tom commented in a previously closed issue:
I just realized that I misunderstood what the project URL setting did. I'll test Theseus with it more to see if I can make it less confusing
When setting the project in Brackets to serve files from a specified url, Theseus does not report debug info. This is true whether the File menu selection is set to 'Mode: Serve files from disk' or 'Mode: Proxy to localhost:3000'. Even if the files are being served from the domain localhost and port 3000, Theseus is not active in Brackets.
This effectively restricts Theseus use in Chrome to the Brackets internal http server.
When including Lodash in a webpage I'm seeing an error where standard JS objects are undefined (i.e.: Array, String, Function, etc.) when accessing them globally; however, they are accessible on the window object.
Loading Lodash outside of Theseus does not have this error occur. I've disabled loading all other scripts but Lodash to ensure there aren't any confounding factors.
Latest sprint (sprint 36 experimental build 0.36.0-11506 (release 942505c3a))
Latest version of node from brew (v0.10.25)
Latest version of node-theseus ([email protected])
Latest version of brackets extension (0.4.10 2014-02-10)
Running my node app with node-theseus, which listens to socket.io port, starts fine, client connects to socket.io fine, but when the client sends its first message the following exception occurs...
SyntaxError: Unexpected token o
at Object.parse (native)
at eval (eval at createTracer (/.../socket.io-2/node_modules/node-theseus/node-theseus.js:169:14), :992:17)
at Socket. (/.../socket.io-2/app.js:78:305)
at Socket.eval (eval at (eval at createTracer (/.../socket.io-2/node_modules/node-theseus/node-theseus.js:169:14)), :1:90)
at Socket.EventEmitter.emit (events.js:95:17)
at Socket.global.__tracer.EventEmitter.emit [as $emit](eval at createTracer %28/.../socket.io-2/node_modules/node-theseus/node-theseus.js:169:14%29, :1151:20)
at SocketNamespace.handlePacket (/.../socket.io-2/node_modules/socket.io/lib/namespace.js:335:22)
at Manager.onClientMessage (/.../socket.io-2/node_modules/socket.io/lib/manager.js:488:38)
at WebSocket.Transport.onMessage (/.../socket.io-2/node_modules/socket.io/lib/transport.js:387:20)
at Parser. (/.../socket.io-2/node_modules/socket.io/lib/transports/websocket/hybi-16.js:39:10)
[node-theseus] caught process.exit() 1 time, not exiting
Clicking on new rule button while in the CSS Quick edit, opens and closes the list of stylesheets instantly.
Since Theseus inserts javascript as first script on the page it breaks the platform.js
from Polymer.
See "platform.js is not the first script on the page. See http://www.polymer-project.org/docs/start/platform.html#setup for details."
I assume Theseus also requires to be the first script otherwise it would be nice to no insert it first or make it optional or something.
This happened while I was debugging Brackets with Theseus:
Theseus version: 0be3671
I'm loving Brackets, but it still has a ways to go before I can really replace Sublime with it. I'd love to see a port.
Can't seem to get Theseus to work with Sprint 36? Should it work with it? Or do I need to downgrade Brackets to 35?
With Brackets Sprint 32 (sprint 32 experimental build 0.32.0-9791 (On branch master,master e49a849fb)) and Chrome Version 30.0.1599.69 m, live HTML Preview is non-functional with Theseus enabled.
To reproduce, attempt Live HTML Preview with Brackets without Theseus, and then try with Theseus. Turning Theseus on and off using the File menu produces the same behavior as removing the extension folder.
Error when install from the command line
[email protected] install C:\Users\userName\AppData\Roaming\npm\node_modules\node-theseus\nod
e_modules\websocket.io\node_modules\ws
node install.js
npm ERR! Error: spawn ENOENT
npm ERR! at errnoException (child_process.js:945:11)
npm ERR! at Process.ChildProcess._handle.onexit (child_process.js:736:34)
npm ERR! If you need help, you may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! [email protected]
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs
node_modules\npm\bin\npm-cli.js" "install" "-g" "node-theseus"
npm ERR! cwd C:\Users\userName
npm ERR! node -v v0.10.0
npm ERR! npm -v 1.2.14
npm ERR! syscall spawn
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\userName\npm-debug.log
npm ERR! not ok code 0
I am using Theseus for Brackets and building an Ember.JS application. The amount of invocations during the render of a view is huge. it exceeds the 4096 limit.
I cannot see any options to either increase this limit or exclude libraries from Theseus.
I believe this is offered when using Theseus outside of Brackets.
If there is a way to do this I've not discovered it, but this would be an invalid issue in that case.
Else, an enhancement request?
Cheers.
Regards, Josh.
Hy..
Tried installing node-theseus with "npm install -g node-theseus" on windows 8 but get this compile error
bufferutil.cc
..\src\bufferutil.cc(15): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [C:\Users\João Henriques\AppData\Roaming\npm\node_modules\node-theseus\node_modules\ws\build\bufferutil.vcxproj]
validation.cc
..\src\validation.cc(14): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [C:\Users\João Henriques\AppData\Roaming\npm\node_modules\node-theseus\node_modules\ws\build\validation.vcxproj]
Issue is on my monitor. Carry on. Sorry about that.
When I create a game library, I usually have a game-loop function.
Because Theseus logs every object for each call, my RAM runs low very quickly in these cases.
As you can see, the RAM increases to 600MB and was still growing. Luckily I have 16GB RAM.
Usually Brackets uses 172-200MB.
Could we get a possibility to ignore certain methods? Maybe via a comment or something.
Or maybe Theseus could get a threshold to hold only the last 20/50/100 calls (but still increase the counter)?
Thanks
Is there any plan to have breakpoints to do live debugging? I guess this would be kind of bringing in node-inspector into Theseus. Its good to see the values and chains after execution has occurred but sometimes its nice to step through the code being executed. What do you think?
Result:
The whole editor area shifts to the right, as if extra padding-left has been added to the line number gutter.
when installing i ran into this conflict....
uninstalling jitsu cured it
sudo npm uninstall -g jitsu
http://stackoverflow.com/questions/14885084/npm-peerdependency-issue-with-grunt-and-flatiron-peer
I love Theseus. But I can't help but feel that it is limited to just displaying information about function execution. I find myself still needing to use breakpoints in order to view the values of my primitives (strings, objects, etc.).
Would it be possible to display information about the various primitives from within Brackets via Theseus? To give you an idea of what I mean, I like how Google Chrome’s Developer Tools do it:
I started working on implementing this, my idea is to implement and agent wrapper around the intlitrace file so that I can see method calls and parameters when using asp.net as a backend.
The main issue is that intlitrace locks the .trace file while writing to it so the data cannot be read while the process has not stopped on a breakpoint.
Maybe this Behavior can be changed or removed (I am using this article as a reference: http://www.wintellect.com/blogs/jrobbins/vs-2010-beta-2-intellitrace-in-depth-first-look).
One option is to copy the basic api and implement my own basic tracer profiler. (I have done something similar in the past with the .net debugging api).
Another is to use il weeving to create interceptors for method calls (just like the way intlitrace does it)
I am unable to use Theseus, Theseus continuously throws an error. From Developer tools: WebSocket connection to 'ws://localhost:8888/' failed: Unexpected response code: 301
When attempting live preview Theseus returns the following:
An error has occurred (have you started a server on port 3000?): {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect"}
node-theseus v0.1.0
theseus v3.1
Brackets Sprint 27
TL;DR; Just use File -> Install Extension: https://s3.amazonaws.com/theseus-downloads/theseus-0.2.8.zip
More info at http://screencast.com/t/HtXNBgVI
Doesn't work:
brackets-theseus
in the extensions
directory.Does work:
brackets-theseus
to thesus
and put it in the extensions\user
directory.My preference would be to update the README to detail the Install Extension approach. It's much less work (and much more successful).
Is it possible debugging a remote Node.JS app instead of a local one ?
Theseus rewrites your JavaScript Source, but it doesn't generate sourcemaps.
Hence if you install the the Console Tools plugin to help debugging issues in the code for example, the line numbers are completely screwed.
Also when you open the Developer Tools in Google Chrome you see the unreadable instrumented code, instead of the code you wrote.
Sprint 34 experimental build 0.34.1-10733
Using bower installed jquery version 2.0.3.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="scripts/bower_components/jquery/jquery.js"></script>
</head>
<body>
</body>
</html>
SyntaxError: Failed to execute query: '*,:x' is not a valid selector. (line 1482)
SyntaxError: Failed to execute query: '[s!='']:x' is not a valid selector. (line 1514)
It is happening in the assert functions in jquery that checks for browser support.
Hi,
I am using WIndows and unable to debug in Brackets.
I have installed Theseus and copied brackets-theseus to extensions/user directory.
After that i installed node-theseus using -g option run my app using node-theseus instead of node.
But still i couldn't debug my files and not getting code coverage etc.,
Am i missing in something?
io.connect('http://localhost')
) will default to the port of the proxy server)The proxy server will refuse the connection. Presumably it has crashed.
If the you connect the socket to the original server directly (ex: io.connect('http://localhost:3000')
) then there is no problem.
The Theseus log for instance displays HTML elements as [object Text]
and [object HTMLDivElement]
etc... It would be great to allow custom serialization of objects.
Are you interested in a german translation?
I'm from germany and your extensions is great (brackets, too), so I could translate the extension into the german language.
But you may should add more translations into the scr/nls-files, so more words would be translated...
Is it just me or dosnt it work anymore?
When debugging Brackets, Theseus attempts to connect to the remote debugger at 127.0.0.1:9234, but the remote debugger for the Edge Code shell is accessible at port 9235. Maybe Theseus can try the latter if connecting to the former fails?
Before discovering Theseus I used node-inspector for debugging with the command below to launch my server and enable debugging:
node --debug server.js
However when using Theseus launcher I find I cannot pass the --debug argument through, nor others such as --port.
Is there are reason that this would not be possible?
It would be very handy to be able to use a full debugger at the same time as seeing Theseus metrics and introspection.
I saved this page to my disk and tried to preview with Theseus:
http://scaledinnovation.com/analytics/splines/splines.html
I get the uninformative error:
"Live Preview Error
Unable to load Live Preview page"
If I "reload without extensions", vanilla Brackets opens the page correctly. Is Canvas not supported or is something else wrong?
Theseus 0.4.13, Brackets Sprint 40. Mac OS X 10.9, latest Chrome.
See adobe/brackets#4801. I'll submit a fix before Monday. attn @alltom.
Hi there,
I'm having issues installing Theseus for Brackets through the UI. I'm using Brackets (sprint 38 experimental build 0.38.0-12606 (release 4df8afdad)). The installation prompts a generic error in the Brackets UI, and shows in the extension list as having an 'extension error'.
The Brackets developer log has the following after downloading Theseus and trying to install. I'm new to both projects so I might be missing something simple, but the extra .js extensions seem suspect. The files (sans the .js extensions for the HTML pages) seem to be in the Theseus folder inside the extensions folder.
GET file://[windowsfileserver]/users$/[username]/AppData/Roaming/Brackets/extensions/user/theseus/package.json.js require.js:1872
GET file://[windowsfileserver]/users$/[username]/AppData/Roaming/Brackets/extensions/user/theseus/src/InstallationCorrupt.html.js require.js:1872
Uncaught Error: Script error for: package.json
http://requirejs.org/docs/errors.html#scripterror require.js:163
Uncaught Error: Script error for: src/InstallationCorrupt.html
http://requirejs.org/docs/errors.html#scripterror require.js:163
GET file://[windowsfileserver]/users$/[username]/AppData/Roaming/Brackets/extensions/user/theseus/src/Invitation.html.js require.js:1872
Uncaught Error: Script error for: src/Invitation.html
http://requirejs.org/docs/errors.html#scripterror require.js:163
GET file://[windowsfileserver]/users$/[username]/AppData/Roaming/Brackets/extensions/user/theseus/src/NewVersionAvailable.html.js require.js:1872
GET file://[windowsfileserver]/users$/[username]/AppData/Roaming/Brackets/extensions/user/theseus/src/InvalidVersion.html.js require.js:1872
Uncaught Error: Script error for: src/NewVersionAvailable.html
http://requirejs.org/docs/errors.html#scripterror require.js:163
Uncaught Error: Script error for: src/InvalidVersion.html
http://requirejs.org/docs/errors.html#scripterror require.js:163
[theseus] fsm: -> waitingForApp fsm.js:35
[theseus] fsm: -> disconnected fsm.js:35
[Extension] failed to load //[windowsfileserver]/users$/[username]/AppData/Roaming/Brackets/extensions/user/theseus Error: Load timeout for modules: text!package.json_unnormalized2,text!src/InstallationCorrupt.html_unnormalized3,text!package.json,text!src/InstallationCorrupt.html,text!src/Invitation.html,text!src/NewVersionAvailable.html,text!src/InvalidVersion.html
http://requirejs.org/docs/errors.html#timeout /utils/ExtensionLoader.js:209
Uncaught RangeError: Maximum call stack size exceeded
in mid-sized node app, theseus with brackets 25 eats 2+gb of ram and then crashes w FATAL ERROR: CALL_AND_RETRY_2 Allocation failed - process out of memory
.
Also, speed slowdown is like 95-99%.
You can try it by yourself
[email protected]:brunch/brunch.git
coffee -bo lib/ src/ && cd ../
./brunch/bin/brunch new test
cd test
node-theseus ../brunch/bin/brunch build
Steps to repro:
Getting Started\index.html
<img>
tagResult:
With (only) Theseus installed, the image looks just like before. Without Theseus (same settings), it has a blue highlighting.
CSS rules are highlighted correctly.
Env: Brackets development build 33 (but as far as I can remember this also in sprints before)
Windows 8.1
My project connects to a server in a different domain but is allowed to fetch data because CORS allows localhost:8888. I can't change the server to allow localhost:3000. It might be easier for me to beg my co-worker to change the server than for you to allow configuring the port, but I'm afraid someone else may end up with the same problem.
Feature request to allow command-clicking on a function call to jump to its definition.
This may be outside the scope of Theseus (perhaps more of a Brackets thing really), but when it comes to debugging it's a nice-to-have to quickly follow the flow of execution.
It would be great if Theseus could support coffeescript. I converted node-theseus to coffeescript with js2coffee (remove the hashbang first) and it then ran CoffeeScript files just fine but Brackets doesn't know what to do with them.
If I compile the coffeescript first to JS it works but then all dependencies need to be converted as well, plus it clutters up the project directory.
Ideally Theseus has native support for showing debugging CoffeeScript but just showing an on-the-fly compiled version of the script would already be very nice.
Happens 100% of the time.
OS X 10.9, node 0.10.22, Brackets latest from the site (sprint 34 experimental build 0.34.0-10729 (On branch master,master efbd1dc7c))
18:46 bin fs-events ❯ node-theseus brunch.js
[node-theseus] caught uncaught exception
Error: ENOENT, no such file or directory '<path>/brunch/bin/brunch.js.fondue'
at Object.fs.lstatSync (fs.js:679:18)
at Object.realpathSync (fs.js:1265:21)
at eval (eval at createTracer (/usr/local/lib/node_modules/node-theseus/node-theseus.js:169:14), <anonymous>:992:17)
at Object.<anonymous> (<path>/brunch/bin/brunch.js.fondue:29:474)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (/usr/local/lib/node_modules/node-theseus/node-theseus.js:163:11)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
[node-theseus] caught process.exit() 1 time, not exiting
To test the new sprint 30 version of brackets linux shell: https://github.com/adobe/brackets/releases/tag/0.30.0-8833
I installed thesus (using the gihub master zip file) manually into ~/.Brackets/extensions/user/
but got this error on starting Brackets afterwards (Brackets was not running when I unzip theseus.
I am on ubuntu 12.04 (x64)
Hi,
the calls counter won't update if not visible. Only if executed when visible they will update again (and then e.g. jump from 10 to 12).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.