opal / opal-browser

Browser support for Opal.
MIT License
115 stars 36 forks source link

debugger not always work when use with Firefox 91.0.2 64-bit. (But always work on Chrome 93.0.4577.63 64-bit) #91

Closed zw963 closed 3 years ago

zw963 commented 3 years ago

I am not sure about this issue is for opal-browser or opal, so, open this issue too.

https://github.com/opal/opal/issues/2295

Describe the bug

debugger not break after added on firefox browser.

Opal version: 1.2.0 Opal browser: github master lastest.

To Reproduce

require 'opal'
require 'js'
require 'native'
require 'promise'
require 'browser/setup/mini'
require 'browser/http'

$document.ready do
  `debugger`
  p "hello"
end

Sorry for can't offer more detail, because i don't know how to debug this issue.

simple to say, debugger is working first(though not every time), and it not work anymore suddenly.

i can add alert "hello" or p "hello" after debugger, those code work as if never debugger exists.

after i try on chrome, it always work, so, i consider this is a issue anyway.

please help me for offer more detail i want.

thank you.

zw963 commented 3 years ago

I find another issue after i switch to use chrome.

i find i can access the Opal context variable now, but it not works when use with firefox.

e.g.

    say_hello = proc do |modal, trigger|
      `debugger`
      alert "hello"
    end

When above debugger triggered, i can access trigger block arg in chrome console, but not work when use firefox.

zw963 commented 3 years ago

Yes, i test it, it works on opal 1.3.0.alpha1 dec23f8 + firefox.