Meteor: Best debugging tool? - meteor

I'm learning how to use Meteor and am coming from some basic/intermediate python/django knowledge.
What's the best debugging tool in Meteor, perhaps one that can let you pause the code in the middle of execution and let you walk through? I'm thinking something like ipdb in python...

On the client, use your browser's developer tools to set breakpoints and step through code.
On the server, since Meteor runs on node.js, you could use node-inspector, which hooks into your browser's developer tools. See Meteor: Debug on server-side for more info on how to get node-inspector working.

Related

Getting started Alfresco development

I want to develop Document Manager application based on Alfresco. I am going to change there many things: user interface, language, may be some functions... But I don't know how to start, where I can get Alfresco source code, how can I rewrite codes with netBeans and how can I test my changes. This is my first serious project so I need any help. Where I can get Started ?!
A very popular way to get started is to work through my tutorials.
You don't need the source code, although it is available and helpful when you are troubleshooting or learning how something works. Instead of forking Alfresco you will write extensions that customize the platform. If you find yourself needing to compile Alfresco's source code, most likely you are doing something wrong.

does any usertest / screen recording software work with meteor?

I'm trying to better understand user experience by seeing what users are doing on the site. There are various tools out there that will work to track the clickstream, and record pageviews, generating heatmaps etc.
However, they don't seem to work with meteor. Since meteor is not even using ajax - it's data over sockets - and I think the tools do not support this newfangled magic.
I was wondering if anyone has found a remote recording/click tracking tool that works with meteor?
For example:
- http://www.luckyorange.com
who have a note here about hooking into the browsers XMLHttpRequest.prototype.open but that's not gonna work with meteor and more socket level protocols, it seems.
mouseflow.com also just recorded a white screen.
crazyegg.com doesn't even support ajax.
There are some other mobile specific tools like:
- http://www.uxrecorder.com/
but that would require native SDKs. First off I just want to put this up for the web.
There's one company https://lookback.io/explore who actually develop their desktop site in meteor, but they are mobile/iOS only :(
it's quite time consuming to try these out so it would be good to know anyone else's experience, eg:
http://www.getapp.com/alternatives/mouseflow-application
How are people doing remote usability testing of meteor sites?
Mouseflow does work with Meteor, though you might need to enable some extra features in the Mouseflow dashboard. The most notable would be the enhanced tracking mode, Session Support, which is necessary to track Meteor pages.
Additionally, it might be necessary to block some scripts from being loaded in playback, but that is something the Mouseflow crew can easily do from their end, if you contact them through the support links.
Disclaimer: I work for Mouseflow
After trying all the tools, I found inspectlet
http://www.inspectlet.com/
and had no problems integrating that with meteor. It's a new tool and seems to be designed from the start with Single Page apps in mind. Overall their tool is quite minimal but does the job really well and seems to work flawlessly with meteor. They're also a startup and were very responsive on other questions.
I created a small wrapper meteor package around Inspectlet and other a few other useful metrics toolkits, if anyone is interested I'll publish it to atmosphere (let me know here).

Script to automatically log in to webpage and click button

I have a time clock system that employees login to via browser and punch for time but I find that the process takes our less tech savvy employees 4-5 minutes. Is there a way to make a script that would auto-login for them, load the punch page, and then select the clock function via menu and then click the 'punch' button? Ideally I'd like to make two shortcuts on the desktop linking to these scripts: one for clocking in and one for clocking out. The button and menu both have IDs so I know it is possible to assign those values via javascript, but I'm unsure of how to do the auto-login / page redirection.
I see several ways you could go with this.
Coding scripts using WebDriver. WebDriver is a browser driver library and should be able to generally interact with most elements, so it could likely do what you're looking for. WebDriver works in a variety of programming languages which gives you flexibility. Here's the getting started guide for Java.
Use a macro recorder like AutoHotKey. Later versions come complete with COM support and you could hook up to Internet Explorer. More details are here. If you don't know AutoHotKey, you'll likely want to go through some of the initial tutorials before digging through that post though.
The third way would be to look for an API or web service or even a tool like curl (a command line tool to fetch URLs). Depending on how your time card application is coded, you might be able to create a batch script that never actually renders the page but just calls the URL in succession. This is likely to be the fastest solution for the users but may prove difficult if there's a lot of asynchronous script calls or PUT http requests in your app. A curl tutorial is available here.
Another solution: Sikuli (free, open source, Linux/Mac OS X/Windows). It allows you to write Python script that clicks on the screen based on the screenshot you provide.
You might also be interested in Selenium IDE:

Access JavaScript & HTTP errors from CutyCapt

Is there any way to access webkit JavaScript and HTTP errors that happen when capturing a page with CutyCapt? I'm trying to debug a thumbnail capture for JavaScript generated documents.
This is not currently possible. I would recommend using a tool like Wireshark to debug any HTTP errors that might occur. It would be easy to add tracing code for network replies to CutyCapt and there are some patches on SourceForge and/or GitHub that do that. I am not sure what could be done to trace JavaScript errors, but ordinarily there should not be any that do not also occur when a page is loaded in a browser. Qt comes with a sample application that implements a rudimentary web browser that could be used for this purpose. I think it also comes with the standard debugger, but I might be misremembering that.

Debug embedded javascript file

There is a class library project with embedded javascript file, with a lot of functions (clint-side implementation), is it possible to debug them?
If I set breakpoints inside this file, they never break.
You can, but there is some setup involved - there's an explanation here:
http://weblogs.asp.net/scottgu/archive/2007/07/19/vs-2008-javascript-debugging.aspx
Once set up it works pretty much the same way you'd debug server-side code.
Edit: I should add that it depends what you're doing as to where is the best place to do your debugging. If you're strictly doing client side debugging then I'd suggest using Firebug etc as suggested by the other answers, if you're moving between client and server side code then it's less clumsy to use the Visual Studio tools as above.
You need to debug javascript client side with something like Firefox/Firebug, FirebugLite, or IE8 Developer tools.
Debugging JavaScript has to be done via the client. Breakpoints in the back end would never be triggered because the back end never actually runs the code.
The method for debugging JavaScript varies by browser. For Internet Explorer, there is an Internet Developer toolbar and a Script Editor that will help. For Firefox, tools such as the FireBug addon are very helpful.

Resources