Turn off Twilio heart beat in console logs - google-chrome

I have pulled the same code from work to my home computer and I am getting these heartbeat console logs which make it impossible to do my own logging. On my work computer they do not show.
Can anyone explain where to turn these off?
Thanks

Twilio developer evangelist here.
I can't tell which Twilio SDK you are using, but the SDKs usually allow you to set a logLevel in a config object. Try setting logLevel: "warn" or logLevel: "error" to avoid these logs.
Alternatively, there is an input at the top of your devtools with the placeholder text that says "filter". You can use that to filter the logs you want to see in the dev tools. So if you prefix your application logging with something unique, you can filter for it.

Related

PhpStorm debug HTTP request not hitting breakpoint

I am fairly certain that I have PhpStorm configured correctly for debugging. When I create a run configuration as "PHP Script", the debugger functions as expected.
Now, I want to debug an "HTTP request" as described in the official documentation, because I want to pass some $_GET parameters - note, this is an AJAX request from the browser.
However, despite following it, the debugger hits no breakpoints; not even on the first code line - even when I set the "stop on first line" option.
When I click the URL indicated by the red arrow, it is launched in the browser (without the parameters), so the path looks ok. I see no PHP errors or warnings in the IDE, nor when I launch teh page int he browser.
vlocalhost` is running just fine.
Any idea what I am doing wrongly?
[Update] With thanks to #LazyOne for that comment.
File/Settings ... Languages & Frameworks/PHP/Debug, point 1), click the "validate" link.
The path shown was the path to the script, which is not the root of localhost. Changing it to the root of localhost validated and is valid - but I still don't hit any breakpoints :-(
This might help some using Windows.
Go to File > Settings > PHP > Servers and uncheck 'use path mappings...'
With thanks to #LazyOne for that comment.
File/Settings ... Languages & Frameworks/PHP/Debug, point 2), seems to have fixed it, installing the browser plugin from https://www.jetbrains.com/help/phpstorm/browser-debugging-extensions.html and activating it (point 3 might also have helped; try it if point 2 isn't enough for you)

Make "Selected Context Only" persist in Chrome DevTools console settings

I get a ton of misc errors from misc Chrome Extensions in my console. If I go to settings and check "Selected Context Only" then they go away and everything is good.
If I ever close that tab, or open a fresh Chrome window, "Selected Context Only" is unchecked again.
Is it possible to get this setting persisted forever and ever?
You can use the filter option as a workaround. For example I was able to hide warnings like 'DevTools failed to load SourceMap: Could not load content for...' with regex -/failed\sto\sload\ssource\smap/
Also you can find a documentation for filtering here https://developers.google.com/web/tools/chrome-devtools/console/reference#filter
Selecting the same option form settings (f1) worked for me
I have the same problem with chrome and brave browser. To avoid showing the error messages comming from webpack dev server like the following screenshot. I defined negative filter in Console to filter them out.
/^((?!sockjs).)*$/
Enable below option in the console settings. It will persist the "Selected Context Only"

How to manually disconnect webpack dev server from chrome

Can I manually disconnect a chrome window from refreshing automatically when I change my code.
Basically I want to disconnect the websocket connection using devtool or some other way. I tried offline checkbox, but its not helping.
This will come handy for a HTML developer for him to compare the HTML changes done from a developer tool and to the original one.
Right-click the WS connection in the Network panel then select Block Request URL. Based on the websocket.org echo demo, it seems to provide the effect you're looking for.
Have you tried setting the hot module reload to false? There is mention of it in the docs.

Watir Webdriver +Chromedriver: ADFS Authentication

I'm attempting to load a page that does a call to ADFS for authentication purposes. On the page load, there is a redirect and then popup to enter credentials.
HTTPS must be used.
Chrome must be used as the testing browser.
So, when loading the page everything is working fine, but I'm forced to manually enter credentials when running the test. After inputting the credentials everything is fine, but is there a way to leverage Watir to input this for me? I've tried popping the username:password into the link already with no success, and since I really need to use Chrome the Firefox plugins are moot.
require 'watir-webdriver'
b = Watir::Browser.new :chrome
b.goto 'https://internalUAT.clientwebsite.com/'
b.link(:text => 'HR Dashboard').click
I'm not allowed to post images due to reputation constraints, but please visit
https://i.imgur.com/ExVt8fp.png
for a screenshot.
When you try passing credentials with the https://user:pass#foo.com technique, do you have any unusual characters in the username or password? (Maybe you have a DOMAIN\username domain prefix?)
If so you might want to make sure any such characters in the credential string are properly escaped.
If that's not the problem, and there's no other way to disable the auth prompt for your tests, then your best bet (IMO) is to write a separate script (or thread) that uses RAutomation (or some other UI automation library of your choosing) to enter your credentials and click the Log In button.
See https://github.com/jarmo/RAutomation
The test cases in the following file contain examples of using RAutomation's send_keys method, which could prove useful:
https://github.com/jarmo/RAutomation/blob/master/spec/window_spec.rb
For the record, it looks like RAutomation may have been used by watir-classic for dialog handling:
https://github.com/watir/watir-classic/blob/master/lib/watir-classic/modal_dialog.rb
http://www.rubydoc.info/github/watir/watir-classic/Watir/ModalDialog

Websockets don't work with Fiddler

Context: I'm trying to debug a website using https://www.npmjs.org/package/webkit-devtools-agent , which uses the Chrome debugger. Furthermore, I want to embed the debug page in an <iframe>, so that I can write client-side javascript to parse the output in ways not officially available. To get round the same-origin restriction on the iframe, I plan to use fiddler to trick the browser into thinking everything is from the same domain.
When I open the page I get an error saying: "Detached from the target. Remote debugging has been terminated with reason: websocket_closed. Please re-attach to the new target."
This happens if the "Capture Traffic" option is selected in Fiddler, even if I just access the debug page directly with no aliasing and without actually using Fiddler.
After it fails, the websocket is broken and I have to restart the webkit-devtools-agent service.
I'm using Fiddler v2.4.9.4 and Chrome v37.0.2062.120m.
Mystery solved: It turns out my proxy settings in Fiddler were out of date (Tools -> Fiddler Options -> Gateway).