Why does my javaScript console keep closing?

I often log information to the javaScript console to help with debugging, but a couple days ago, it started to be forcefully closed anytime I open it. Is there a setting in PC that causes this? Can I shut it off? It’s quite annoying to say the least and complicates the development process.

Any suggests are welcome.



Which Javascript console?

The browser’s JavaScript console. When I launch the game from the editor, it opens up a new page. That new page will forcefully close my console window anytime I open it. For me, I can open it using CTRL+SHIFT+J.

Hmm, the only time Chrome will do that is if I reduce the size of the window myself. Then it will close the debug console.

That’s browser behaviour, not PlayCanvas so there’s no setting on the PlayCanvas side that can change that

Strange! Here is a video: https://youtu.be/yC9NHNn-gmk

This is using Brave browser.

In this case, I don’t believe it’s a browser setting. I’ve never had this behavior on any other website and I tend to use the console window as much as the regular window. It might be a behavior limited to Brave browser; I’ve been able to reproduce it on multiple computers.

I noticed that Brave was originally blocking the “consent.js” script – that’s the one that asks us to accept cookies. While that script was blocked, this behavior didn’t happen. It was only after I allow that script and accept cookies that it starts to forcefully close the console.

I’ve not seen this locally on projects that I’ve been working on. This this still happen to you with a brand new project that has no code in it?

Does opening the debug console internally and not externally work?

Currently, you’ve stated you use CTRL+SHIFT+J - which opens the console externally in another window.

F12 on the hand should open the console in the same, active window internally.

There’s also a possibility that your browser(s) have popup windows disabled in your settings relating to ads, thus restricting opening external windows automatically.

maybe it is a popup issue with the browser
pop-ups may be blocked and need to be allowed

I’m having the same issue here, using Brave Browser.
It doesn’t matter if the console is in the same window or detached as a separate window.
However, I tried with chrome and there it still seems to work without closing.

I think chrome has a better inspect element and is more stable

ps. like really half of the purpose if u saw the no ads and annoying pop-ups on youtube about brave
BRAVE maybe by default blocks pop up and ads
so disable the security to ads and pop up somewhere

just things to keep in mind

I don’t think it’s the popup blocking mechanism, as it used to work flawless for a long time.
Also, the dev console is not a popup and it’s not opened by the page, it’s opened by me by pressing F12.