Disable logs for specific file, firebug - debugging

I'm trying to debug a small piece of functionality, however the firebug console is giving me lots of logs from different files and I don't care about those at all.
Is there a way to tell firebug to ignore logs/warning/errors from chosen files?

There is currently no way to do so in Firebug, but there is already an issue filed, which requests this feature.
It's still unclear how the UI should look like, so you can make a suggestion there.
Sebastian

I am not sure about firebug but you can do that in Google Chrome. In the 'Inspect Elements' window right click on any line that you don't like to be logged, there will be menu with 'Filter' option and you can choose the file to filter for logging.

Related

Suppress Firefox/Firebug SHA-1 warning

I use Firebug for web development. Since version Firefox 37 I see the following annoying message in my console:
This site makes use of a SHA-1 Certificate; it's recommended you use certificates with signature algorithms that use hash functions stronger than SHA-1"
I understand that it is an important message, but it is duplicated many times and makes my work almost impossible.
Moreover, it appears every time my page communicates with other pages, for example with Google Analytics and other counters. So if I were to update my certificate, this message would still appear because these sites would have SHA-1.
So any site with GA gives me trouble.
How can I disable or filter this message?
As stated in the Firebug discussion group, Firebug's Console panel currently (Firebug 2.x) cannot filter single messages out. You can only filter by messages matching a specific text using the search field.
There are enhancement requests like issue #4507 reported to add such a filter, though it is unlikely that this will get implemented in Firebug, especially not in version 2.x, directly.
Firebug 3 will integrate into the built-in DevTools, which allow you to filter those warnings by unchecking Warnings within the Security menu inside the Console panel:
Besides that I created bug 1170476 asking to reduce the messages to a minimum.
Update:
Firebug development is discontinued. Instead, there is a Firebug theme available within the Firefox DevTools starting from Firefox 48. Bug 1170476 is fixed since Firefox 42, so you will only see one message logged with a counter showing how often the message occurred.
you can get rid of the message, but you have to modify firebugs code.
Sorry forgot to mention you need to convert the .xpi to .zip and extract the files first. You can leave the folder as is when done or zip it and convert it to an xpi again. You will need to restart Firefox.
locate the pluggin in your firefox profile dirctor and go to this file "\extensions\firebug#software.joehewitt.com\content\firebug\console\errors.js".
search for "logScriptError: function(context, object, isWarning)".
After the code "var error = new ErrorMessageObj(object.errorMessage, object.sourceName, object.lineNumber, object.sourceLine, category, context, null);".
input the following code:
if(error.message.indexOf('SHA-1') != -1 || error.message.indexOf('Security Policy') != -1){
return false;
}
should be about line 330.
Select the Console tab and, keeping pressed Ctrl on the keyboard, click on Errors, Info, Debug Info, Cookies.
Bear in mind that this will disable the output of all the warnings logged in Firebug and not only the ones generated by googleapis.
Remove HTTPS from the URL or keep all resources local.

How to prevent Firebug 2 spewing out SHA-1 certificate warnings in the console [duplicate]

I use Firebug for web development. Since version Firefox 37 I see the following annoying message in my console:
This site makes use of a SHA-1 Certificate; it's recommended you use certificates with signature algorithms that use hash functions stronger than SHA-1"
I understand that it is an important message, but it is duplicated many times and makes my work almost impossible.
Moreover, it appears every time my page communicates with other pages, for example with Google Analytics and other counters. So if I were to update my certificate, this message would still appear because these sites would have SHA-1.
So any site with GA gives me trouble.
How can I disable or filter this message?
As stated in the Firebug discussion group, Firebug's Console panel currently (Firebug 2.x) cannot filter single messages out. You can only filter by messages matching a specific text using the search field.
There are enhancement requests like issue #4507 reported to add such a filter, though it is unlikely that this will get implemented in Firebug, especially not in version 2.x, directly.
Firebug 3 will integrate into the built-in DevTools, which allow you to filter those warnings by unchecking Warnings within the Security menu inside the Console panel:
Besides that I created bug 1170476 asking to reduce the messages to a minimum.
Update:
Firebug development is discontinued. Instead, there is a Firebug theme available within the Firefox DevTools starting from Firefox 48. Bug 1170476 is fixed since Firefox 42, so you will only see one message logged with a counter showing how often the message occurred.
you can get rid of the message, but you have to modify firebugs code.
Sorry forgot to mention you need to convert the .xpi to .zip and extract the files first. You can leave the folder as is when done or zip it and convert it to an xpi again. You will need to restart Firefox.
locate the pluggin in your firefox profile dirctor and go to this file "\extensions\firebug#software.joehewitt.com\content\firebug\console\errors.js".
search for "logScriptError: function(context, object, isWarning)".
After the code "var error = new ErrorMessageObj(object.errorMessage, object.sourceName, object.lineNumber, object.sourceLine, category, context, null);".
input the following code:
if(error.message.indexOf('SHA-1') != -1 || error.message.indexOf('Security Policy') != -1){
return false;
}
should be about line 330.
Select the Console tab and, keeping pressed Ctrl on the keyboard, click on Errors, Info, Debug Info, Cookies.
Bear in mind that this will disable the output of all the warnings logged in Firebug and not only the ones generated by googleapis.
Remove HTTPS from the URL or keep all resources local.

where can I download this code

I find a interesting website:http://www.brightpointinc.com/interactive/political_influence/
I want to learn its visualization using d3.
But when I download it, using right click button-------- save as The download page seems does not work. It seems lack some data, so I get back to the website to download some data, but it lacks some of them, can anyone send me an work version? thanks
As Lars says, your best bet is to look at the source code. To do this, you can use something like Chrome Developer Tools or Firebug for Firefox. I use the latter, so I'll take that as an example.
First, I'd right-click on the visualization itself, and click on Inspect Element with Firebug. This will pull up the HTML, which is only semi-helpful, since it only shows the output rather than the JavaScript code which created it.
To get at the JavaScript, you can use Firebug's Script tab. Most websites have more than one script, so you can hunt through the scripts being used by browsing through the dropdown menu in the second toolbar. The _buildChords.js script looks the most promising; that has some recognizable d3 code in it. You could check out the others to see what else they're calling (since it looks like there might be others - data.js, events.js, and so on).
Happy learning.

console.log not showing in my firebug

In jsfiddle.net, I have this simple code:
console.log('yep');
alert('hello');
I can see the alert window but nothing in my firebug console.
Is there a reason why ?
I'm encountering it as well on my FF15.
In my case, it is caused by the built-in "web console" in "web developer"
Ctrl+Shift+K
https://developer.mozilla.org/en-US/docs/Tools/Web_Console
Beginning with Firefox 4, the old Error Console has been deprecated in favor of the new, improved Web Console. The Web Console is something of a heads-up display for the web, letting you view error messages and other logged information. In addition, there are methods you can call to output information to the console, making it a useful debugging aid, and you can evaluate JavaScript on the fly.
I'm new to using console.log (I used to use alert()s) and was wondering why I couldn't see console.log messages in Firebug too.
After a several minutes of web searching I realised the console mode was set to 'Debug Info'. Clicking the 'All' button made all my messages appear.
The OP didn't make this particular mistake, admittedly. It's a rookie error, but still non-obvious enough (I haven't used Firebug for a while) to bring me here before I managed to figure it out.
This issue has been fixed in Firebug 1.11.0a5. More info is here
I just had the same issue with firefox 29 Beta (and Australis) Just restart the browser :)
EDIT : seems like its it's not true : on the first page load, it display the log, on the others not (need to open the page in a new tab). Apparently it's queryLoader2 jQuery plugin

Firefox Live DOM

Is it possible through a plugin or setting or something to allow Firefox to recognize the live DOM source code?
Basically, firebug or other similar tools can recognize elements on the page which Firefox does not.
I understand with these extensions I have the ability to see such changes made by javascript, but Firefox does not seem to fully recognize them.
I'll try to clarify.
If I load a page and view source (ctrl-U), I see what the server sent to Firefox, and what Firefox ostensibly recognizes as the source code of the page. If in that source code, there is javascript which alters the DOM, and then I hit (ctrl-U) again, the code is not updated.
I am using a testing tool (iMacros firefox plugin) to automate functionality, but it does not recognize the updated DOM because Firefox does not. Firebug and similar tools can recognize these "live" updates. Does that help?
http://www.chapter31.com/2006/12/04/viewing-ajax-generated-source-code/
You can try using the web-developer extension with a view-generated-source option.
I'm still not sure I understand your question, but I think what you're getting at is the Web Developer extension for FireFox, specifically its "View Generated Source" feature.
That will let you see the altered DOM.
Firebug gives u this ability:
for instance check the HTML tab when running a jquery ticker and see the dynamic changes live in the DOM
Usually, when I have weird issues with either the console or the DOM inspector with firebug, I find restarting the browser and validating your code is the way forward.
That said, I'm not really following your question, the document that firebug shows is the same one in the firefox window...?
It looks like the problem is not that you want firefox to show the current DOM when you hit CTRL+U, but that you want some automated testing tool to be able to test your web pages.
Perhaps you should use a testing tool that is suited to the job of testing rich web applications, Selenium, for example, can do this.

Resources