Theseus and The Console- what to do?

77 views
Skip to first unread message

David Foley

unread,
Aug 23, 2014, 5:14:54 PM8/23/14
to theseus...@googlegroups.com
Couldn't help the creepy capitalisation, but this is kind of a blocker for me- I cannot use console and I need to use console to debug messages and events as I go. I get the following notices in amongst others:

    ConsoleAgent: Opening the Developer Console will break the connection with Brackets! (url: http://127.0.0.1:58374/objectkit.prefab/brandname.html) in __tracer.connect:47

    You must connect to the WebSocket before sending messages.

If my code looks like this in a webpage (excerpt)
<script>
(function () {
    console
.info('I got executed')
})();
</script>

Theseus will indeed show that the closure was executed, but there is no 'I got executed' message in the Theseus Log. Why is this? How can I make this happen? My Theseus settings are Enable Theseus (ticked) and Mode: Serve files from disk. Could someone please give me a walk through as to how I can use Chrome console in conjunction with Theseus? 

Very much appreciated, 

best, 

Dave

David Foley

unread,
Aug 24, 2014, 10:44:26 AM8/24/14
to theseus...@googlegroups.com
Just an update. To anyone familiar with Brackets this won't be surprising. 

It was not detailed that Theseus uses ConsoleAgent which requires Developer Tools to be active to log console messages from project code. After discovering tis, I found that it was not working so I checked my Chrome settings and noticed that I had cookies blocked as I normally do; I unblocked cookies,  and then I was able to see my codes log messages in another Chrome window with Developer Tools in it. This is a very distracting 'workflow'. I had been hoping that my console messages would have appeared IN Brackets alongside Theseus's Log - its very distracting having to write code, save code, view code in browser, click, check log in browser, return to code in Brackets etc even with two monitors. It should just be save, auto-run, see my console messages alongside output in Theseus Log. It would keeps me more code focused anyhow. 

Can I make a feature request here that project code console statements are output into the Theseus Log. Anybody else have any feelings about this?


Tom Lieber

unread,
Aug 26, 2014, 12:29:01 PM8/26/14
to David Foley, theseus...@googlegroups.com
Ah, this is an oversight on my part! Theseus captures log messages by checking for calls to console.log, but doesn’t check for console.info. That ought to be a small change… Are there any other logging functions I should detect as well?

Log messages should indeed also appear in the Brackets Developer Tools console, which is less awkward when you don’t have Theseus installed and it’s the only log you have to look at. :)


--
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/

David Foley

unread,
Aug 26, 2014, 1:48:45 PM8/26/14
to Tom Lieber, David Foley, Abridged recipients
Hi Tom, 

its always the minutiae isn’t it?! Thats great news. I guess being equal part Java/ Js dev, #info just seemed to be a universal to be, and it not being there… I assumed the worst. Apologies about that. In relation to console, I haven’t checked all of the methods- I’m just about jumping in with Brackets and definitely Theseus- but IRL I’ve found the Chrome Console API Reference to be a good point of reference. If I find anything in my travels I’ll post it back here. So; console#log it is then for the time being :)

Tom Lieber

unread,
Aug 26, 2014, 2:58:42 PM8/26/14
to David Foley, Abridged recipients
Thanks for the link! I decided to track console.log, console.info, console.warn, console.error, and console.trace. Theseus won’t display any of them differently, but it will at least show them in the Theseus log under ‘console’ (formerly ‘console.log’).

I released it as version 0.4.15. This also happens to include the exception handling improvements because they were already in my branch and no one sent me any bugs. :)


On Tue, Aug 26, 2014 at 10:48 AM, David Foley <davi...@gmail.com> wrote:
Hi Tom, 

its always the minutiae isn’t it?! Thats great news. I guess being equal part Java/ Js dev, #info just seemed to be a universal to be, and it not being there… I assumed the worst. Apologies about that. In relation to console, I haven’t checked all of the methods- I’m just about jumping in with Brackets and definitely Theseus- but IRL I’ve found the Chrome Console API Reference to be a good point of reference. If I find anything in my travels I’ll post it back here. So; console#log it is then for the time being :)

--
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.

David Foley

unread,
Aug 26, 2014, 3:38:49 PM8/26/14
to theseus...@googlegroups.com, davi...@gmail.com
Thats great Tom- just discovered you can do that in the previous edition by the ugly move of globally stating:
console.info= console.log

That 'works' if one can't update, but I'll be updating tonight thats for sure. Great work. Just say console.log in Theseus Log. Fucking deadly (pardon my language). Great stuff though :)
Reply all
Reply to author
Forward
0 new messages