Now that Firebug has been subsumed into Firefox, how can I configure the browser to bring Javascript errors to my attention without having the console open all the time, as Firebug used to do by showing an error count on its toolbar icon?
The Firefox DevTools provide a so-called "Developer Toolbar" aka GCLI (openable via Firefox menu > Developer > Developer Toolbar or Shift + F2), which displays the number of errors on the page (besides providing many useful commands):
Update:
The DevTools team obviously plans to remove the Developer Toolbar, because of low usage and because it's unmaintained and for most of it's features are available somewhere else.
There is no replacement yet for the error count, though, but a comment on the related bug report indicates that it will be added back.
Another options is to use Chrome extension JavaScript Errors Notifier.
To install it in Firefox, you'll first have to install another extension Chrome Store Foxified, which enables you to install any Chrome extension from Chrome Web Store to Firefox. You can follow the instructions of Chrome Store Foxified to install the extensions you like. (Note that not all Chrome extensions will work in Firefox.)
If you want to install the Chrome extension permanently, you'll have to sign up with Mozilla to get the extension signed.
If the JavaScript Errors Notifier extension is successfully installed in Firefox, you'll see an icon appearing at the right end of the address bar.
And when there's any JavaScript error in the page, the icon will turn red. To see the details of the errors, you can click on the icon. And the extension have quite some options to tune the errors that you want to get alerted.
Related
I have this warning appearing in my safari extension preferences. However I have tried removing every single part of the permissions in the manifest.json of the safari extension however no luck.
This extension was created using the xCode tool to port the firefox extension to safari.
Discovered the answer after constant researching into this;
Initially with extensions it will not show the warning banner.
However if your website requires access to the webpage using content.js, then safari will pop up with this warning message to the user:
If the user clicks on Always Allow on This Website, then the warning message will not appear however what will appear is:
This just highlights a list of all the websites that you have individually accepted access to.
However if you decide just to let the extension have access to ALL webpages then the following warning will then appear:
So it doesn't seem that it is possible to remove this message, as it's a safari-focused message
I hava situation where some javascript a web page works fine in Safari and Chrome, but fails in IE11. Unfortunately due to issues with confidentiality I cannot put the javascript up here.
In IE11 the web page's java script fails to operate correctly. By that I mean some of the javascript works and some doesn't. With no errors displayed or any other indication of whats wrong.
If I try to debug the page using IE's developers tools, all the javascript works perfectly without any errors or issues.
Searching on the net I found many people with the same IE problem - fails normally, works when debugging. The main issues they talk about is the console.log(...) statement. I checked my javascript and don't have any console.log(...) statements.
I then saw a stackoverflow thread where adding a cache:false to the $.ajax({... calls solved the issue. I added the same flag but the problem still persists.
Are there any other bugs I've not found?
The web page is using jQuery to handle most of it's manipulation of the DOM with a single $.ajax... call and a series of $.get(... calls polling the server.
How to debug your web pages.....IE11 tips.
All modern web browsers suppress scripting error messages and warnings by default. (In the early days web browsers would halt page loading/rendering and display a script error message with an alert statement)... this gives the best user experience who isn't concerned with the internal workings of web site code.
So, scripting errors will only BREAK execution if:
1. The browser debug tool is opened. and
2. The developer tools' Debug tab setting for Break on Exceptions has been turned on.
So to debug your web pages.
1. navigate to about:blank to start a testing cycle.....press f11 to display the dev tool, select "Break on all exceptions" from the dropdown (looks like a stop sign). Pin the dev tool to the bottom of the browser.
2. Return to the browser address bar and navigate to your test site (typed address of paste and go)...
The dev tool will now break on ALL exceptions and you will list them in the console tab.
IE has built-in content blocking and has ActiveX filtering (ad blocking) which can affect outcomes. You need to configure Internet Options so that the IE dev tool console will record any blocked content or security (XSS) errors.
Tools>Internet Options>Advanced tab, check "Always record developer console messages".
Also on the Emulation tab of the IE dev tool you will find the Emulation Mode (aka documentMode) that IE is using, and how it was established eg. x-ua meta, Enterprise site mode list, user Compatibility View list, etc
If you are developing an internal company website, the emulation mode used by IE may be for an earlier version of IE.. (IE8 on XP).. you should include this information with your questions.
You should also include the IE security zone that your site has been mapped to.. File>Properties menu in IE.... eg. Intranet zone as this can have different security and blocked content outcomes.
finally, the first step in troubleshooting web browser issues is to test in noAddons mode (for IE, winkey+r>iexplore.exe -extoff ). IE has built-in form-fillers and popup blockers... third-party addons can affect the outcomes expected.
Google Chrome v48.0.2564.116 (64-bit) for Mac OS seems to retain all console commands indefinitely. None of the following have any affect:
clear()
console.clear()
Command-K
turning off "preserve log" and "show all messages"
Clear browsing data, from the beginning of time, all options check marked - removing all cookies
quitting and restarting or shutting down and rebooting.
Any combo of the above.
Unable to locate a chrome_debug.log file anywhere on the system (i.e. logging is not check marked).
Trashing Google Chrome and the associated library files then re-installing got rid of the console history, but the new version nonetheless holds all console subsequent console entries indefinitely.
Any insights? Any idea where this information gets stored?
If you are using windows 10. Just Simply go the console and right click then click on clear console
Thanks to Karmiphuc and the following link:
How to remove all recent console command
which mostly answers the question.
It's slightly understated there that, on Mac OS at least, you have to call the developer tools twice consecutively.
So 1st pull up a browser window, and do Command-Shift-I (Mac shortcut).
Then, making sure the Developer Tools window is undocked, do a second Command-Shift-I which pulls up yet another Developer Tools window.
Now look under Local Storage > chrome-devtools://devtools > consoleHistory.
I am creating a purely browser based app - HTML and JavaScript.
I do not have an Android IDE installed (nor one for iOS) - and would prefer not to have to install one and perform remote debugging.
Developing on my PC, I use the Chrome browser and the developer tools to view the JavaScript console in order to debug.
How can I do that on an Android tablet (or, later, iOS)? I prefer a purely browser based solution, but could accept an Android/iOS based app.
Try https://github.com/liriliri/eruda
All you need to do is add this snippet on top of the page:
<script src="https://cdn.jsdelivr.net/npm/eruda"></script>
<script>eruda.init();</script>
And you get an interactive set of developer tools similar to those in Chrome and Firefox. Here's a screenshot:
Just released for iOS, Chrome 73 now supports the option to see console.log.
If you’re a website developer, you can now view JavaScript console
messages. Navigate to chrome://inspect to enable, then perform desired
actions in another tab. Switch back to the same chrome://inspect tab
to view any printed JavaScript console logs.
see here in "What's New" section or in "version history" 73.x version.
For Android you can use remote debugging through chrome as described here
I'll summarize/rewrite the steps (for browser based debugging) here in case the link ever goes down.
Requirements:
For browser tabs: Android 4.0+ and Chrome for Android
A USB cable to plug in your Android device
Chrome 32 or later installed on your development machine
Set up:
Enable USB debugging on your device.
Navigate to chrome://inspect/#devices on your desktop Chrome browser. (Alternatively, to get to the same screen, you can select Chrome menu > Tools > Inspect Devices)
After connecting, you may see an alert on the device requesting permission for USB debugging from your computer. Tap OK
Chrome should now display the connected device
Open up chrome on your Android device and navigate to the page you want to debug/inspect. The page should show up on your desktop browser and you should be able to inspect it.
If for some reason you have an older version of chrome and cannot upgrade. There is a plugin that you can install to accomplish the same thing.
I was searching for a while for something like this. Firebug Lite used to be an option but has been abandoned. Before discovering eruda (as mentioned elsewhere in this thread), I developed my own open source console. It's pretty light on features, but it does the main things - capture JS errors, and allow you to run commands to inspect variables and object on your page.
Here's a demo:
It's activated by just placing this script tag on your page:
<script src="https://cdn.jsdelivr.net/gh/SimonEast/MiniConsoleJS#main/console.js"></script>
Open source, GPL licence. Available at: https://github.com/SimonEast/MiniConsoleJS/
I'm trying to use Firebug to debug a JavaScript file in an extension I've added to Fx 4.
Can anyone tell me how to do it? I can only see website scripts.
Use Chromebug it's firebug for extension development, witch will give you the full ability to inspect debug firefox it self and all firefox extension as if it's a webpage :)
1- install the latest version from here: http://getfirebug.com/releases/chromebug/
2- Winkey+R to open run then type firefox.exe -chromebug this will run firefox with chromebug
3- for more information visit http://getfirebug.com/wiki/index.php/Chromebug
Please see MDN - Building An Extension - Debugging Extensions, which shows what tools Firefox provides you with to natively debug extension, also take a look at Dive Into Greasemonkey - Debugging User Scripts (PDF, p.13) which is aimed more specifically at your request.
Other than that, see How to debug a Greasemonkey script with the Firebug extension?
On Firefox 19 or later, it's possible to use the built-in JS debugger on the browser itself. Go to about:config and set the following two prefs:
devtools.chrome.enabled: true
devtools.debugger.remote-enabled: true
After you restart the browser, you can access the Browser Debugger through Tools > Web Developer > Browser Toolbox.
(note that you must accept the incoming connection)
See more at: https://developer.mozilla.org/en-US/docs/Mozilla/Debugging/Debugging_JavaScript#JavaScript_Debugger
In the bottom right hand corner there should be a little Firebug icon. Single or double click to open then you see some tabs at the top. Click the "Console" tab for real time debugging, or the "SCript" tab to view the scripts that have been loaded. Note, you can also load CSS and HTML through Firebug, use the "Viewer" icon to view HTML code on the page in real time.