How to verify Pendo snippet installation? - installation

How to verify my Pendo snippet installation is correct, or simply see the data sent to Pendo? Preferably done in a browser's dev tool.

From Pendo's documentation, you can run pendo.validateInstall() in a browser's console. You will be able to see the data.

Open Google Chrome (or any web browser with dev tools).
Visit your domain with the Pendo snippet installed; usually it's your http://localhost:<InsertYourPort> during development.
<Right Click> -> Inspect -> Console.
Type pendo.validateInstall() as what Shao has suggested with Pendo's docs attached.
If problems occur, Pendo's docs has debugging tips and commands you can use.

Related

How to sign Firefox addon after editing it?

So the story is like this. I debug a site which throws a lot of warnings:
Strict-Transport-Security: The connection to the site is
untrustworthy, so the specified header was ignored.
That is because there is no proper certificate for localhost. But that is very annoying and I was not able to find option to filter out firebug console. So I decided to go into code. I found that firebug is inside ~/.mozilla/firefox/blablabla.bla/extensions/firebug#software.joehewitt.com.xpi and that is zip which I could open with Vim and got to content/firebug/console/errrors.js, find there a variable pointlessErrors and append my message to it.
Firefox ignores changes but after I restart it, it gives me message that firebug was not verified and was disabled. I's probably good, because it will protect me from lot's of risks, but I'm sure in my changes.
How to tell firefox that? Or how to properly make changes to plugins?
Or is there some option for Firefox to shut up about Strict-Transport-Security? (I know, I know, too many questions in one question, but I want to find best solution).
The answer to your question's title can be found in the Mozilla wiki:
There it says:
How do I get my add-ons signed if they are not hosted on addons.mozilla.org (AMO)?
You will need to create an AMO account and submit your add-on. There will be an option where you indicate the add-on won't be listed
on AMO, and you'll be able to submit your add-on files without having
them published on the site. Please read the Distribution Policy for
more details.
You can also use the jpm sign command to generate a signed XPI that can be self-hosted.
There is an API you can use for signing.
Having said that, there are easier alternatives to signing the extension:
Go to about:config and set xpinstall.signatures.required to false.
Install the Nightly, Developer Edition or unbranded version of Firefox
Here's the related answer from the wiki:
What are my options if I want to install unsigned extensions in Firefox?
The Developer Edition and Nightly versions of Firefox will have a setting to disable signature enforcement. There will also be
special unbranded versions of Release and Beta that will have this
setting, so that add-on developers can work on their add-ons without
having to sign every build. To disable signature checks, you will need
to set the xpinstall.signatures.required preference to "false".
type about:config into the URL bar in Firefox
in the Search box type xpinstall.signatures.required
double-click the preference, or right-click and selected "Toggle", to set it to false.
Regarding the question about getting rid of the warning regarding Strict Transport Security I see a few other possible solutions:
Access your localhost via HTTP instead of HTTPS.
Suppress sending the Strict-Transport-Security header on localhost.
Install a proper certificate.
Note that this warning is shown for security purposes, so there is some risk in disabling it generally.

Webstorm debug session - Variables view

When I am debugging from the IDE using the Chrome addin
It starts up and I can set breakpoints and edit the code live which is really great, but when I try to inspect the current state using the Variables view, I can't see all of the object members. For example, if I debug using the Chrome Developer Tools I see...
...I have live access to the entire object structure.
But in Webstorm I can only see this...
It seems like it only works for user defined properties and the __proto__ object. Is this the case or is there a setting somewhere to enable this? There is nothing I can find in the Webstorm documentation indicating that this is a limitation of the tool...
I just want to know if this is a limitation or not.
Just in case the pics are not clear, here are the pics of the document node in the WS IDE, Watches window...
And here is what I expect to see and what I do see in the Chrome Dev tools...

Why does WebStorm's LiveEdit not work in Chrome?

I am exploring WebStorm's trial version and would like to use the LiveEdit features.
I am not able to use the LiveEdit features after performing the following actions:
Made sure that LiveEdit is turned on
Installed the Chrome extension
Restarted the browser after installing the extension (I still suspect it is not required)
Run the HTML page in chrome
When I modify the HTML body, I don't see the changes reflected in Chrome.
I read on a forum that netty is not required.
Do we need it?
What else do I need to configure so that I can use the LiveEdit feature?
PS: I am using WebStorm 5.0.
Do you happen to have IntelliJ open by chance?
The point is that the port, 63342, is 'seized' by another app (even if it has nothing to do with HTML debugging).
When the port is busy, LiveEdit tries the next one, 63343. If you right click the JB icon on Chrome, choose Options, increment the port by one, and press Apply, you will magically connect. I wish Jetbrains would have bothered to inform the user what is the port that they are currently attempting to use.
In my PC it happened when I had Mac on. Either one of the following worked:
1. Kill IntelliJ IDEA (that was also open) and try again
2. Increment the port by one as I mentioned above.
I had to go to Run -> Debug (CTRL+F5 on Windows)
What helped in my case was activating "Can accept external connections" under the Settings -> Build, Execute, Deployment -> Debugger
WebStorm Settings
More details as requested:
Installed the JetBrains IDE Extension for Chrome
Make sure the LiveEdit Plugin is installed and activated (Settings -> Plugins)
Make sure "Can accept external connections" is checked (Settings -> Build, Execute, Deployment -> Debugger) AND Port is the same as in the Chrome Extension
Make sure Update ist set to "Auto in (ms)" e.g. 300 (Settings -> Build, Execute, Deployment -> Debugger -> Live Edit)
In my case live edit was just disabled (for some reason)
For anyone googling this thread, LiveEdit is now supported without a plugin. Just go into settings and uncheck "Use JetBrains IDE Support extension for debugging and Live Edit".
Without the extension, the debugging and live edit are more reliable based on my personal experience.
I couldn't make Chrome and Webstorm to link with each other. Chrome plugin was set to 63343 port or something like that.
I am on Windows. I opened command line with administrator privileges and typed:
netstat -a -b
to see all programs and ports they are listening to. I then found first entry regarding WebStorm.exe and saw that it was listening on port 30897. I set that port number in my chrome plugin options, and everything worked.
A quick fix: in the Chrome addon configuration, use the ip 0.0.0.0 for the host.
Turning off the automatic connection configuration from Internet Explorer properties worked for me smoothly. IE is the boss.

Logging to console from Firefox extension?

I understand that I can log to the console when using a Firefox extension with the cfx run command.
Is there a way to log to a console after the extension has been packaged with cfx xpi? Logging to Firebug is fine if possible.
I have found two blog posts about this (here and here). Both are rather old and don't work any more.
I'm using version 1.10 of the add-on SDK and FF15.
You need to do 2 things:
enable logging for addons
• in about:config, add a new option extensions.sdk.console.logLevel and give it the value "all"
• restart Firefox
in Firefox open the Browser Console:
• Tools -> Web developer -> Browser console
• NOTE: this is different from the usual Web Console used to debug web pages
You should see addons logs there now.
TLDR:
Go to about:config url and create key extensions.sdk.console.logLevel with value all
See log messages either in Browser console (Ctrl+Shift+J) or in terminal you started Firefox from.
cfx or its successor jpm creates this configuration key automatically in development firefox profile.
From logging documentation:
extensions.sdk.console.logLevel: if set, this determines the logging level for all installed SDK-based add-ons.
extensions.extensionID.sdk.console.logLevel, where extensionID is an add-on's Program ID. If set, this determines the logging level for
the specified add-on. This overrides the global preference if both
preferences are set.
I will summarize recent changes that has taken with Firefox since this question got posted -- basically updated #LucaBonavita answer.
In about:config, check if option extensions.sdk.console.logLevel is enabled. If not, toggle to enable. You might need to create it if it does not exist
Open Browser Console
Menu Bar -> Tools -> Browser Tools -> Browser Console
Enable Show Content Messages in browser console.
Now, console.log triggered by Firefox addon/extension should display
Tested on Firefox 94.0.2 (64-bit) and 95.0b12 (64-bit)
Have you tried console.log() with Firebug? (I know you have tried Application.console.log() and Firebug.console.log() already)
I just tried it in the Web Console on FF16 running Firebug 1.10.4 and it seems to work:
Here are some more examples from the Firebug Wiki itself: FirebugWiki Console API
Additionally, you can write messages of different types in the console, such as: console.debug(), console.info(), console.warn(), console.error()
If you run console.log from Add-on code, it send up in the 'Messages' tab of the Error Console window:

Auto open Chrome web inspector for all pages

I need to trace redirect using network tab, but it works only if I open web inspector and then reload page. Unfortunatly, I open this page from external native program and need to found, which URL is passed to browser. Is it possible to do this? I bneed to do this on Windows 7.
As far as I know this isn't possible. The complete list of up-to-date chromium command line switches can be found here: http://peter.sh/experiments/chromium-command-line-switches/
I thought you might be able to to get something working using --wait-for-debugger-children, giving you enough time to open the developer tools before the page loads, but setting that flag also gives the developer tools a 1 minute delay before loading.

Resources