Passphrase button inserts system command to Farjs allowing you to pair remove-debugged device with FarJS console.
Steps to pair the remote-debugged device:- Open farjs.net on the remote-debugged device (like iphone)
NOTE ! Make sure that you are opening the console (this page) matching the same protocol (http/https) that the client is running on.
Hello mobile developers!
I know that there are a lot of native ways to do mobile debugging, but sometime we need to quickly check something, or alter CSS or fix JS error, and in that case using farJS is the fastest way.
FarJS is debugging console, that is aiming to help mobile developers to get debugging capabilities close to Firebug, or other browser debugging tools.
Step 1: Open http://www.farjs.net and select "Quick Start Using Debug Proxy". Add site that you want to debug into the url bar and click "GO".
Step 2: A warning alert box will notify that Farjs is loaded and will explain that this is only debug console and not the real site. Click OK and wait for the second box asking you for a passphrase. Enter your passphrase (something unique) and click OK on the next alert box that tells that Farjs is connected.
Step 3: In desktop's browser open the console at http://farjs.net/console (or open http://farjs.net and select 'The Console') , put your passcode and have a happy debugging ! In the JS tab for example you could type: alert('test') and you will see the result in the debugged device.
- Q:Does FarJS work on native applications with web view?
- A:Yes, you could use FarJS to debug a webview inside a native app.
- Q:Does this working on android devices?
- A:Yes, FarJS was tested on HTC one, although the way of adding the bookmarklet is slightly different, the functionality is the same.
- Q:Does the console work on IE ?
- A:The console is not supported on IE < 9
The easiest way to do that (if you don't have access to site's source code) is by using FarJS bookmarklet.
There are various ways to add bookmarklets, on different devices. The easiest way if the device supports it is just to drag the "FarJS Injector" link to your bookmarklets, as it's been done in desktop browsers like Firefox and Chrome.
Unfortunately most of the mobile devices including the iPhone don't support this, so we have to go through a few extra steps in order to add the bookmarklet to the bookmarks menu.
For more information of how to add bookmarklets on a specific device, you could google 'adding bookmarklets on htc one' for example. The steps below explain how to do that on iPhone/iPad.
1. On the device that will be debugged, navigate to http://farjs.net and click on "The bookmarklet" button.
2. Add this site to your bookmarks.
3. Copy the entire text inside "Bookmarklet code" as it is shown in the picture below.
4. In the device's bookmarks menu click 'Edit' and navigate to the newly created bookmark from step 2 and click on it.
5. The bookmark url will contain "http://farjs.net". click to edit it.
6. Delete "http://farjs.net" and paste the code that you copied in step 3 and you just created FarJS bookmarklet.
7. Start using FarJS for debugging.
- Navigate to the websithe that you want to debug, open the bookmarks and select 'FarJS'
- A pop-up window will appear asking for passphrase. The passphrase is used to establish connection between the debugged device and the console. Make sure that you really selected SOMETHING UNIQUE as a passphrase, otherwise it might collide with other people's passprases. Simply said: someone else could establish connection with your device and your connection between the device and the console will be terminated. So if you want stable connection, please don't use something simple like '123' :)
- Once you entered the passphrase, an alert box will show up informing you that the device is connected.
- On the desktop browser navigate to http://frjs.com and select "The console" and enter the same passprase to establish connection.