Git Product home page Git Product logo

Comments (19)

alltom avatar alltom commented on June 13, 2024

It doesn't seem that you're missing anything. I'll test the build next time I'm at my Windows machine. Sorry it didn't work out-of-the-box.

from theseus.

alltom avatar alltom commented on June 13, 2024

You were lucky enough to submit your ticket just before my thesis was due, so it unfortunately fell through some cracks. I then moved across the country and I'm waiting on access to another Windows machine.

Is it possible that you have a firewall that prevents the WebSocket from Brackets from connecting to node-theseus? It attempts a connection on port 8888.

from theseus.

alltom avatar alltom commented on June 13, 2024

I just tested on a computer running Windows 7 Enterprise SP1 and had no problem debugging Node.js scripts using the steps you described. Does anything show up in your Brackets developer console (Debug > Show Developer Tools)?

from theseus.

MannyC avatar MannyC commented on June 13, 2024

I was also having trouble on W7. It started working although I'm not entirely sure why.

FWIW, when it wasn't working it didn't seem to be giving me much to go on. For instance, it would have been nice if the node-theseus part gave me debugging info so I knew Brackets was connecting to it etc. There were a lot of messages in the dev tools window but nothing jumped out at me.

from theseus.

alltom avatar alltom commented on June 13, 2024

Sorry about that. node-theseus 0.0.8 adds much more logging (--theseus-verbose and --theseus-verbose=2) that covers just about everything it does. :) That ought to give enough information to diagnose future problems.

from theseus.

Revlin avatar Revlin commented on June 13, 2024

I'm also on Windows 7 and not seeing any response what so ever, other than new options under the 'File' menu, once theseus has been installed in Brackets. Let me start by saying I'm really unclear about the instruction in the "Usage..." sections of the README. There are seperate sections for Node.js and Chrome, as if you would be using one or the other. Further more the Chrome section does not say anything about Chrome, but rather tells what options to select in Brackets. Maybe you can give me a quick break down based on what I'm trying to do...

I'm using Brackets in combo with an HTTP server. My project settings in Brackets are to serve files from 'http://localhost:80/'. In the 'File' menu options, I've selected 'Live Preview', 'Enable Theseus', 'Mode: Serve files from disk'. I start up Brackets, navigate to my HTML file, then hit the Live Preview button, which starts up Chrome. The project shows up in Chrome, then I look back at Brackets, specifically at the embedded javascript or the files that were included with script tags, and I don't see any action by theseus. Should I?

Here's some seemingly relevant output from the Brackets dev tools:

[StaticServer] Failed to connect to node ["Unable to load one of the modules: C:/Users/revlin/AppData/Roaming/Brackets/extensions/user/theseus/proxy/ProxyDomain"] Agent-chrome.js:202
(anonymous function) Agent-chrome.js:202
f.Callbacks.n jquery-1.7.min.js:2
f.Callbacks.o.fireWith jquery-1.7.min.js:2
f.Callbacks.o.fire jquery-1.7.min.js:2
NodeConnection.loadDomains NodeConnection.js:345
f.Callbacks.n jquery-1.7.min.js:2
f.Callbacks.o.fireWith jquery-1.7.min.js:2
NodeConnection._receive NodeConnection.js:422
Uncaught RangeError: Maximum call stack size exceeded /C:/Program%20Files/Adobe/Brackets/www/extensions/default/JavaScriptCodeHints/thirdparty/tern/lib/infer.js:1
[StaticServer] Timed out while trying to connect to node Agent-chrome.js:187
(anonymous function)

from theseus.

alltom avatar alltom commented on June 13, 2024

"Unable to load one of the modules" suggests that your Theseus installation may be corrupt. There was a race condition that caused Brackets Sprint 24 (and earlier?) to randomly corrupt extensions containing subdirectories if you attempted to install them using Brackets' "Install Extension" UI. Theseus creates its menu items early during initialization, so it can appear to be working even when some of its files fail to load. Could you try 1) upgrading to Brackets Sprint 25 and reinstalling Theseus, or 2) if you can't upgrade, installing the extension by downloading the zip file and copying the 'theseus' folder into your extension directory manually?

As for the README, I'd love to make it more clear if I could better understand the confusion. You can use Theseus to debug JavaScript running in Node.js, JavaScript running on a web page in Chrome, or both. The procedure for each is slightly different. Brackets already has a feature for interacting with web pages opened in Chrome called Live Development. The Chrome section of the Theseus README tells you what options to set for Live Development to work with Theseus on your project. After setting the options (as it seems you did), triggering Live Development will open the web page in Chrome and also activate Theseus. Does this explanation help, or is the issue something else?

from theseus.

Revlin avatar Revlin commented on June 13, 2024

Thanks for the explanation. Since the debug info from theseus does not display in Chrome, but in Brackets, and Chrome already has a set of debugger tools, and apparently debugging Node.js has nothing to do with Brackets (or does it?), my suggestion is that you change "Usage: Debugging JavaScript in Chrome" to "Using Theseus in Brackets".

I'm using Brackets "sprint 25 experimental build 0.25.0-7701" and I installed Theseus by downloading the zip file because I read somewhere else that the extensions downloader in Brackets was buggy. I'll try again from scratch and see if that helps.

from theseus.

alltom avatar alltom commented on June 13, 2024

All of the debugging happens in Brackets. The JavaScript being debugged can be running in Node.js or in Chrome.

Did you use the zip file linked in the installation instructions, or the zip file GitHub makes of the repository? (Only the first one will work.)

from theseus.

MannyC avatar MannyC commented on June 13, 2024

Perhaps "Debugging JavaScript running in Node.js" and "Debugging JavaScript running in Chrome"?

or even "Debugging JavaScript that's running in Node.js" and "Debugging JavaScript that's running in Chrome"?

Admittedly I wasn't confused on this issue.

alltom, I can't be the first to ask, but any thoughts to adding execution times?

from theseus.

alltom avatar alltom commented on June 13, 2024

This issue's comment thread is getting a bit unwieldy, but what do you mean by "adding execution times"?

from theseus.

MannyC avatar MannyC commented on June 13, 2024

I suppose at its most basic I mean the time taken to execute the function from call to return.

from theseus.

Revlin avatar Revlin commented on June 13, 2024

@MannyC in other words, code profiling

@alltom Thanks for being so responsive and dedicated to your project, Tom. I'm now updating Brackets to sprint 26 and the first thing I notice is that I had both sprint 24 and sprint 25 installed at the same time. So, I guess it's really important to completely uninstall brackets before installing a new version.

I will also delete as many of the file references to Theseus and Brackets as I can, then download the zip file that you linked to here before starting over...

So, now that Brackets is installed and working, I've downloaded the theseus-0.2.13 zip file. I open Brackets and click "Help > Show Extensions Folder". This opens a directory somewhere in my Users...AppData path showing two subdirs, 'disabled' and 'user'. Close Brackets, then extract the 'theseus' folder from the zip archive to the 'user' subdirectory in 'extensions'. Now I have .../extensions/user/theseus so I restart Brackets. Under the 'File' menu I can see that 'Enable Theseus' and 'Mode: Serve files from disk' have been selected. I pop open the Extensions Manager to double-check and I see 'Theseus for Brackets', '0.2.13 - Tom...'

Time to launch Live Preview with my html file. It opens in Chrome, I can see that the dynamic content is loaded by javascript, so back in Brackets I check out the javascript file. Plenty of JSLint messages, but no sign of Theseus. Incidentally I now launch Live Preview on this js file, I will see text in Chrome, beginning with:

tracer.add("scripts/..."

and after a very dense code block, eventually I'll see the text from my script. Is 'tracer' an object from Theseus?

Once again, my developer tools output, but no error msgs related to Theseus:

less: parsed file:///C:/Program%20Files/Brackets%20Sprint%2026/www/styles/brackets.less successfully. less-1.3.3.min.js:8
less: css for file:///C:/Program%20Files/Brackets%20Sprint%2026/www/styles/brackets.less generated in 4439ms less-1.3.3.min.js:8
less: css generated in 4440ms less-1.3.3.min.js:8
Resource interpreted as Font but transferred with MIME type application/octet-stream: "file:///C:/Program%20Files/Brackets%20Sprint%2026/www/styles/fonts/SourceSansPro/SourceSansPro-Regular.ttf".
Resource interpreted as Font but transferred with MIME type application/octet-stream: "file:///C:/Program%20Files/Brackets%20Sprint%2026/www/styles/fonts/SourceSansPro/SourceSansPro-Semibold.ttf".
Resource interpreted as Font but transferred with MIME type application/octet-stream: "file:///C:/Program%20Files/Brackets%20Sprint%2026/www/styles/fonts/SourceSansPro/SourceSansPro-Light.ttf".
Resource interpreted as Font but transferred with MIME type application/octet-stream: "file:///C:/Program%20Files/Brackets%20Sprint%2026/www/styles/fonts/SourceCodePro/SourceCodePro-Regular.ttf".
fsm: -> waitingForApp fsm.js:35
fsm: !! exit [] fsm.js:42
fsm: !! enter [] fsm.js:42
fsm: !! appReady [] fsm.js:42
fsm: -> disconnected fsm.js:35
fsm: !! exit [] fsm.js:42
fsm: !! enter [] fsm.js:42
Theseus Usage Reporting Init 
Object
 Usage.js:103
Theseus Enable 
Object
 Usage.js:103
Deprecated: resizable panels should be created via PanelManager.createBottomPanel(). Using Resizer directly will stop working in the future. 
Element: 
<div id="theseus-panel" class="bottom-panel vert-resizable top-resizer no-focus" style="box-sizing:​ border-box;​ "></div>​
 Resizer.js:176
Uncaught TypeError: Cannot call method 'addType' of undefined extensions/default/JavaScriptCodeHints/thirdparty/tern/lib/infer.js:370
GET http://127.0.0.1:9222/json  Inspector.js:230
getDebuggableWindows Inspector.js:230
connectToURL Inspector.js:311
doLaunchAfterServerReady LiveDevelopment.js:640
x.extend.Deferred.r.then.x.Deferred.e jquery-2.0.1.min.js:4
x.Callbacks.l jquery-2.0.1.min.js:4
x.Callbacks.c.add jquery-2.0.1.min.js:4
x.extend.Deferred.r.then.x.Deferred.e jquery-2.0.1.min.js:4
x.extend.each jquery-2.0.1.min.js:4
x.extend.Deferred.r.then jquery-2.0.1.min.js:4
x.extend.Deferred jquery-2.0.1.min.js:4
x.extend.Deferred.r.then jquery-2.0.1.min.js:4
open LiveDevelopment.js:748
_handleGoLiveCommand main.js:131
onGoLive main.js:170
x.event.dispatch jquery-2.0.1.min.js:5
x.event.add.y.handle jquery-2.0.1.min.js:5
fsm: !! inspectorConnected [] fsm.js:42
fsm: -> waitingForPage fsm.js:35
fsm: !! exit [] fsm.js:42
fsm: !! enter [] fsm.js:42
fsm: !! gotDocument [] fsm.js:42
fsm: -> initializingTracer fsm.js:35
fsm: !! exit [] fsm.js:42
fsm: !! enter [] fsm.js:42
failed to get tracer instance 
Object
 Agent-chrome.js:220
fsm: !! tracerConnectFailed [] fsm.js:42
fsm: -> waitingForPage fsm.js:35
fsm: !! exit [] fsm.js:42
fsm: !! enter [] fsm.js:42

from theseus.

Revlin avatar Revlin commented on June 13, 2024

Hmmm, I think I've figured it out. I though it was very odd that activating Live Preview on a javascript file caused the file to be served with the 'tracer' object wrapper from http://127.0.0.1:59507 since my project settings used http://localhost:80 and that's where the html files are served from in Live Preview. So, I changed my project settings, erasing the http address so that html files would be served from Bracket's built-in test server. Lo and behold, when I run Live Preview on html files I can now see Theseus output in Brackets.

Lesson learned: on Windows 7, theseus will only work for javascript running in Chrome when the Project Settings server option is NOT set and the 'File' menu option is 'Mode: Serve file from disk'

from theseus.

alltom avatar alltom commented on June 13, 2024

And thank you for being so persistent!

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.

Also, it used to be that if you started Live Development with a JavaScript file open, Theseus hinted to Brackets that it should open the root URL for the project. It looks like that behavior has changed. I will correct Theseus to either fix that or re-enable the "this isn't an HTML file!" warning.

from theseus.

MannyC avatar MannyC commented on June 13, 2024

@alltom yeah, profiling. To be honest, the although I realize now it doesn't mention it on the readme page, because it's recording the execution I had expected it to do profiling to some degree.

from theseus.

alltom avatar alltom commented on June 13, 2024

Theseus almost collects enough data for that (and could collect enough with small modification). You should open an issue about it since it's going to get lost in this thread.

from theseus.

Revlin avatar Revlin commented on June 13, 2024

Thanks, Tom.

It's a great extension to brackets, the exception messages are very helpful, as well as the invocation counting. I look forward to future updates.

from theseus.

alltom avatar alltom commented on June 13, 2024

Anyone who still has problems should open new issues so that they can be tracked in a sane way. :)

from theseus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.