Debugger/Inspector behavior difference when Amber not served

19 views
Skip to first unread message

Pavel Krivanek

unread,
May 15, 2020, 2:18:16 AM5/15/20
to amber...@googlegroups.com
Hi,

out of curiosity, I tried to check how Amber can run without being supported by a web server, so I tried to open the `index.html ` directly as a file on disc. Legacy IDE can still work, but I have found one interesting difference that I cannot explain.

When you try to run a debugger (`self halt`) or an inspector, the system fails on a JavaScript error in `isSmalltalkObject:`. When you do the same on the served system, it works, but there is no related HTTP request of any kind. Do you have any clue what makes it fail?

Cheers,
-- Pavel

Herby Vojčík

unread,
May 15, 2020, 3:12:04 AM5/15/20
to amber...@googlegroups.com, Pavel Krivanek
On 15. 5. 2020 8:18, Pavel Krivanek wrote:
> Hi,
>
> out of curiosity, I tried to check how Amber can run without being
> supported by a web server, so I tried to open the `index.html ` directly
> as a file on disc. Legacy IDE can still work, but I have found one

In what configuration? In Brave, it fails to load b/c access to
localStorage fails. In Firefox I loaded it fine. (in both cases a new
project created by `amber init`).

> interesting difference that I cannot explain.
>
> When you try to run a debugger (`self halt`) or an inspector, the system
> fails on a JavaScript error in `isSmalltalkObject:`. When you do the

For me, in firefox, it doesn't; actually, it runs as expected ("Halt
encountered" and stack trace).

> same on the served system, it works, but there is no related HTTP
> request of any kind. Do you have any clue what makes it fail?
>
> Cheers,
> -- Pavel

Herby

Herby Vojčík

unread,
May 15, 2020, 3:58:06 AM5/15/20
to Amber ML, Pavel Krivanek
On 15. 5. 2020 9:42, Pavel Krivanek wrote:
>
>
> pá 15. 5. 2020 v 9:09 odesílatel Herby Vojčík <he...@mailbox.sk
> <mailto:he...@mailbox.sk>> napsal:
>
> On 15. 5. 2020 8:18, Pavel Krivanek wrote:
> > Hi,
> >
> > out of curiosity, I tried to check how Amber can run without being
> > supported by a web server, so I tried to open the `index.html `
> directly
> > as a file on disc. Legacy IDE can still work, but I have found one
>
> In what configuration? In Brave, it fails to load b/c access to
> localStorage fails. In Firefox I loaded it fine. (in both cases a new
> project created by `amber init`).
>
>
> It was Chromium, I tried now the same in Firefox and there the debugger
> and inspector works. Normally served version (amber serve) works well in
> Chromium.
> So is the problem in the restricted local storage access?

Restricted localStorage access completely stopped loading, so that is
probably not the issue... let me try the evil Chrome... indded, as you
say. It loads fine (Brave is more strict with the localStorage access),
but then it fails because handleError: anError gets nil as an argument,
which gets passed over to asSmalltalkException: and then to
isSmalltalkObject:.

Maybe Chrome passes undefined to unhandled exception handlers when it
happens in file://, but passes the actual error when in http(s)://? I
don't know atm, must be something like that.

> > interesting difference that I cannot explain.
> >
> > When you try to run a debugger (`self halt`) or an inspector, the
> system
> > fails on a JavaScript error in `isSmalltalkObject:`. When you do the
>
> For me, in firefox, it doesn't; actually, it runs as expected ("Halt
> encountered" and stack trace).
>
>
> Same here, only Chromium has this issue.
>
> -- Pavel

Herby

Herby Vojčík

unread,
May 15, 2020, 4:03:34 AM5/15/20
to amber...@googlegroups.com, Pavel Krivanek
On 15. 5. 2020 8:18, Pavel Krivanek wrote:
> Hi,
>
> out of curiosity, I tried to check how Amber can run without being
> supported by a web server, so I tried to open the `index.html ` directly

Thanks for your curiosity, it ended up with issues 1254 and 1255. :-)

Herby
Reply all
Reply to author
Forward
0 new messages