Safari JavaScript Console Not Executing JS Or Showing Output On Certain Pages - debugging

I've encountered a Safari-specific JS issue in a page I'm locally developing, so I need to use the Safari Web Inspector.
In Safari Version 13.1.1, when I open the inspector and select Develop > Show JavaScript Console and start entering JavaScript, I don't get any output and the JavaScript is not executed (e.g. an alert does not fire).
On any other page, the safari JS console works just fine for me. Here's an example of normal behavior, on stackoverflow.com:
Note: the Safari JS console on other locally developed pages are working just fine.
What could possibly be causing this?

As other users mentioned, opening the page in a new tab fixes this, but you can also just close the Javascript console (clicking the 'x' in the console window) and re-open it.

Less than ideal, but if you reopen the file on a new tab, the new console works.

I get this error. often, this is because I occasionally repeat something way too many times, so that it just stops executing the console, I believe to prioritize other code. my fix is to re-open the page, and even though re-loading sounds like it works, it doesn't always.

Related

Preventing project execution from stopping when moving Chrome tab to another window

Whenever I execute an MVC project that opens on Google Chrome, it opens a new window with the website. I have tried several times to move it to another Chrome window which already has several tabs, but whenever I do that, the Project stops executing.
Is there a way to prevent that from happening? Thank you.
Notes: I run the project on Debug mode, with the Google Chrome explorer.

Vscode debugger hits a breakpoint on page reload

I'm debugging a react application using VS Code debugger for Edge (The newer Chromium edition, I used to use Chrome, AFAIR there was the same problem). When I reload a page, the "paused in debugger" label appears a couple of times, then disappears. It doesn't bother me too much, but the problem is it always opens Sources panel and because of that on every reload I have to open Console manually which is very annoying.
I'm absolutely sure I have no breakpoints on, the Breakpoints panel in Edge is empty, the Breakpoints panel in VS Code only contains my breakpoints and the problem persists if I disable all of them. I also have Uncaught exceptions breakpoint turned on, but disabling it doesn't help. Sources panel opens some React internal file, namely injectGlobalHook.js. Also sometimes after reloading a page I open VS Code to find that it opened a tab with react-dom.development.js for some reason. Is it supposed to work like this? And is it possible to make Console tab open on reload, because it's impossible to work like this

How to make the Web Bluetooth Pair button work when run as chrome app

I have a simple set of HTML and JS which when I test it directly as a web page, loaded locally from the file system in Chrome, works fine. I can click a button causing a call to navigator.bluetooth.requestDevice. This correctly causes the usual window to appear and it lists the expected Bluetooth peripheral. I can then select it and successfully pair, with my code receiving the expected callback.
If I try to execute the same html/js as a Chrome app, with a manifest and invoked from chrome://extensions the requestDevice window appears and lists the expected peripheral with the Pair button disabled. If I select the peripheral, the Pair button becomes enabled but if I click it, the window disappears into the background, behind Chrome and nothing else happens that I can see. My code receives no callback. It looks like the call was competely ignored.
What do I need to do to make this work within a Chrome app?
Thanks
Chrome Apps and Extensions should be able to use Web Bluetooth. This is a bug. I've filed chromium issue 751819.
As a work around, create the Chrome App window larger than the device chooser dialog that pops up.

New Tabs are opening randomly in browser

I use Chrome as my browser and for the past week or so, tabs have been randomly opening when I start Chrome, sometimes as I'm browsing. It started with a tab opening one day as I was watching a video, I clicked on it thinking it was a popup (like the ones that come up when you click somewhere on a website, the ones that AdBlock miss) and it was just some random forum I've never seen before. I closed it, then forgot about it. Ever since then, the same thing has been happening - random tabs will open, sometimes just 1 or 2 but sometimes there's at least 10, opening all at once.
what should i do to get rid of this problem?
when i run chrome this popup appear
Maybe you clicked to a link which automatically ran some malwares and installed or hooked some bad scripts into your system. I used to get same issue and I have to re-install my windows (re-install Chrome only didn't work)

In IE6, how can I determine if window.open is redefined?

I have this odd problem with a third party script. On our site a popup window loads a demo of one of our applications when a link is clicked. The third party script is supposed to popup an additional window underneath at the same time or sometime thereafter.
(Yeah this sounds crazy but the popups must load in this way.)
Of course this works fine in FF3.
Problem is in IE6 only the third party script pops up, but not the demo popup. If I click the link again the demo popup works.
After the thirdparty script saves it's session cookie it's window doesnt popup anymore but then the Tools popup works. (if i reload the page and it saves the cookie info -- this is the expected behavior. the third party popup should only load on the first session)
Seems to me that at some point down the wire windows.open isnt getting called properly because of some timing issue or windows.open being redefined somewhere. I don't see any error messages.
To pinpoint the issue I thought I'd have to see whats going on with the windows on the click.
I guess I need some help in figuring out what information I should look for to try and debug this issue.
This'll tell you if you're dealing with the real window.open or a redefined one:
var isOpenNative = /\[native/.test(window.open+'');

Resources