Question / Help How to get Console.Log in BrowserSource?

Valcry

New Member
Hi folks,

I'm writing a local html file in order to show donations during the stream. Everything works fine in Firefox and Chrome. But currently not longer in OBSStudio.
It would be helpful to get the console.log from the OBS Browser.
Is there any possibilty to log things here or to show a console?

Thanks in advance. Would highly appreciate help, because our charity event is in a few weeks.
Val
 
Launch obs(64).exe with "--remote-debugging-port=9222" then open your local chrome and go to "localhost:9222".
That parameter is directly passed to the obs browser and tells it to open a remote debugging server on port 9222 (you can change the port if you want).
 

Valcry

New Member
Launch obs(64).exe with "--remote-debugging-port=9222" then open your local chrome and go to "localhost:9222".
That parameter is directly passed to the obs browser and tells it to open a remote debugging server on port 9222 (you can change the port if you want).
Great, thank you. I got heavy Problems with HTML5 Audio, probably CORS.
Just in OBS. 4 Other browsers work fine.
 
Now what's the problem? You should be gettings a pretty detailed log telling you what's wrong from the remote debugging page. Also what version of obs are you running?
 

Valcry

New Member
Now what's the problem? You should be gettings a pretty detailed log telling you what's wrong from the remote debugging page. Also what version of obs are you running?
Latest Version of OBS always. And additionally the RC4.

I have totally random problems while playing a google TTS message via HTML Audio. But only in OBS.
Brave, Chrome, Firefox and Edge are running smooth.

As per debugger it gives me a 404 error for this URL
"https://translate.google.com/transl...l=de&q=Und noch eine&textlen=13&idx=0&total=1"

This URL has been calculated by
https://github.com/hiddentao/google-tts

The code works well. The thing is, when I'm hardcoding a similar url with any text, it will be played in OBS.
But the generated (identical!) url not. It makes simply no sense.

404 from Google is a CORS Problem. Already tried to set crossorigin in Audio to "anonymous" or "use-credentials" but without success. Sometimes it works in OBS but most of the time not.
Because we need this for a charity event for children with cancer it's quite important.
 

kehlankrumme

New Member
Launch obs(64).exe with "--remote-debugging-port=9222" then open your local chrome and go to "localhost:9222".
That parameter is directly passed to the obs browser and tells it to open a remote debugging server on port 9222 (you can change the port if you want).
Thank you so much for this.
 

MAF

New Member
Hi Kehlankrumme - where would I put the launch command ? thanks!
Create a shortcut and right click, select Properties and then select Shortcut tab. Place that text after the "...obs64.exe" in Target field. Post raised from the dead for Google frogs.
 

techygrrrl

New Member
Thanks to everyone's posts and comments here I was able to debug a browser source website I had built that was running everywhere except in OBS. I'm running an old version of OBS (v27) and it turns out the JavaScript I was using in my browser source was too modern, which caused syntax errors in the browser running in OBS v27 on Windows (v27 on Mac was fine). I downgraded my JS build to target ES2016 and that worked.

I ran OBS in debug mode by following the instructions provided above. I found the existing shortcut, copied it to my desktop by holding Ctrl and dragging it to my desktop and renamed it something memorable (appending "with debugger 9222" so I can distinguish it from my other one). I modified the copied shortcut and added --remote-debugging-port=9222 to the end of the "Target" field after the closing quotes as recommended by others above:

Place that text after the "...obs64.exe" in Target field.

I've attached a screenshot in case there's any confusion for others finding this post where this flag must be added.
1694413767946.png
1694414509964.png

That allowed me to view my browser source and see the syntax errors.

This forum is great, and it's awesome that OBS offers the ability to remotely debug the browser sources. I was able to quickly fix the issue after being able to see the errors. Thanks!
 
  • Like
Reactions: MAF
Top