Debuggers and async/await should work together better: I have testcases.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Debuggers and async/await should work together better: I have testcases.

Alex Vincent
A few minutes ago, I released version 0.8.2 of the es7-membrane project. [1]  I've been using Mozilla Firefox primarily to debug it as I go, and I find the built-in JavaScript debugger has a few quirks when asynchronous functions come into the mix...

Most notably, when I step over an "await" statement, the debugger treats it as if I'm exiting the function altogether. 

Also, exceptions thrown within the async functions after an await tend not to show up when I'm stepping through the code.

I know I should be filing this in Bugzilla, and I will this weekend... I'm posting this here for all JS engine & debugging tools teams, as a heads-up:  when it comes to async functions, the step-through-code user experience is subpar.

As for tests people can step through to see what I'm talking about:  see [1] for the source under docs/gui/tests.  To run the tests, type |npm run gui-tests|.  I use Karma to implement the tests. The karma.conf.js file in the root directory has a "singleRun" setting that developers can change to false for debugging purposes (attaching breakpoints to a test, for example).

If it's on a weekend, I can be available to demonstrate what I'm referring to, or to show people how to reproduce these behaviors.

Thanks!



Alex Vincent
Hayward, CA, U.S.A.

[1] https://github.com/ajvincent/es7-membrane


--
"The first step in confirming there is a bug in someone else's work is confirming there are no bugs in your own."
-- Alexander J. Vincent, June 30, 2001

_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Debuggers and async/await should work together better: I have testcases.

T.J. Crowder-2
On Fri, Dec 1, 2017 at 9:27 AM, Alex Vincent <[hidden email]> wrote:
>
> I know I should be filing this in Bugzilla, and I will this
> weekend... I'm posting this here for all JS engine & debugging
> tools teams, as a heads-up:  when it comes to async functions,
> the step-through-code user experience is subpar.

Maybe on Firefox (just verified), not on Chrome. The experience in Chrome (so, the combination of Chrome's devtools and V8's support) is very good indeed. Stepping over `await` just steps over it. Stepping into it steps into it. Extremely natural. Haven't tried Edge's F12.

So a Bugzilla report may be appropriate, although I suspect there's one already there and/or that they're already on it.

-- T.J. Crowder


_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Debuggers and async/await should work together better: I have testcases.

Jason Orendorff
In reply to this post by Alex Vincent
Alex,

I asked around, and our debugger folks say that stepping over await should work in current shipping Firefox. Haven't checked out your test case yet, but someone here will.

In any case, please do report a bug! Instead of Bugzilla, report it here:

If you don't mind Slack, you can hop on this one (and ping @yulia or @jorendorff) to talk more about async debugging:

-j



On Fri, Dec 1, 2017 at 3:27 AM, Alex Vincent <[hidden email]> wrote:
A few minutes ago, I released version 0.8.2 of the es7-membrane project. [1]  I've been using Mozilla Firefox primarily to debug it as I go, and I find the built-in JavaScript debugger has a few quirks when asynchronous functions come into the mix...

Most notably, when I step over an "await" statement, the debugger treats it as if I'm exiting the function altogether. 

Also, exceptions thrown within the async functions after an await tend not to show up when I'm stepping through the code.

I know I should be filing this in Bugzilla, and I will this weekend... I'm posting this here for all JS engine & debugging tools teams, as a heads-up:  when it comes to async functions, the step-through-code user experience is subpar.

As for tests people can step through to see what I'm talking about:  see [1] for the source under docs/gui/tests.  To run the tests, type |npm run gui-tests|.  I use Karma to implement the tests. The karma.conf.js file in the root directory has a "singleRun" setting that developers can change to false for debugging purposes (attaching breakpoints to a test, for example).

If it's on a weekend, I can be available to demonstrate what I'm referring to, or to show people how to reproduce these behaviors.

Thanks!



Alex Vincent
Hayward, CA, U.S.A.

[1] https://github.com/ajvincent/es7-membrane


--
"The first step in confirming there is a bug in someone else's work is confirming there are no bugs in your own."
-- Alexander J. Vincent, June 30, 2001

_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss



_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Debuggers and async/await should work together better: I have testcases.

Alex Vincent
As requested, I've filed https://github.com/devtools-html/debugger.html/issues/4853 .  Thanks for the help in advance!

Alex

On Fri, Dec 1, 2017 at 8:58 AM, Jason Orendorff <[hidden email]> wrote:
Alex,

I asked around, and our debugger folks say that stepping over await should work in current shipping Firefox. Haven't checked out your test case yet, but someone here will.

In any case, please do report a bug! Instead of Bugzilla, report it here:

If you don't mind Slack, you can hop on this one (and ping @yulia or @jorendorff) to talk more about async debugging:

-j



On Fri, Dec 1, 2017 at 3:27 AM, Alex Vincent <[hidden email]> wrote:
A few minutes ago, I released version 0.8.2 of the es7-membrane project. [1]  I've been using Mozilla Firefox primarily to debug it as I go, and I find the built-in JavaScript debugger has a few quirks when asynchronous functions come into the mix...

Most notably, when I step over an "await" statement, the debugger treats it as if I'm exiting the function altogether. 

Also, exceptions thrown within the async functions after an await tend not to show up when I'm stepping through the code.

I know I should be filing this in Bugzilla, and I will this weekend... I'm posting this here for all JS engine & debugging tools teams, as a heads-up:  when it comes to async functions, the step-through-code user experience is subpar.

As for tests people can step through to see what I'm talking about:  see [1] for the source under docs/gui/tests.  To run the tests, type |npm run gui-tests|.  I use Karma to implement the tests. The karma.conf.js file in the root directory has a "singleRun" setting that developers can change to false for debugging purposes (attaching breakpoints to a test, for example).

If it's on a weekend, I can be available to demonstrate what I'm referring to, or to show people how to reproduce these behaviors.

Thanks!



Alex Vincent
Hayward, CA, U.S.A.

[1] https://github.com/ajvincent/es7-membrane


--
"The first step in confirming there is a bug in someone else's work is confirming there are no bugs in your own."
-- Alexander J. Vincent, June 30, 2001

_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss





--
"The first step in confirming there is a bug in someone else's work is confirming there are no bugs in your own."
-- Alexander J. Vincent, June 30, 2001

_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss