Debug async code Cocos Creator 3.0

Seems like a great update but i have an issue:
consider the next ss.ts file:

import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('ss')
export class ss extends Component {
    test() {
    }
    async testAsync() {
    }
    onLoad() {
        debugger
        this.test()
        this.testAsync()
    }
}

when I run a simple test in chrome
regular function is called from ss.ts
but the async function is being called from ss.js
image

this makes it imposible to debug async code.

That’s why it’s called async… The call stack of async function is hard to trace.

thanks for the quick answer, but in 2.3.X it had worked as i expexted.

consider the next test.ts:

const { ccclass, property } = cc._decorator;

@ccclass
export default class NewClass extends cc.Component {

    async testAsync() {
    }

    test() {
    }

    start() {
        debugger
        this.test()
        this.testAsync()
    }

    // update (dt) {}

}

and trying on chrome:

image

image

both can be debuged throu the .ts file.

UP!
will really appriciate some help :smiley:

Do you mean you can not (single)step into the async function and reside at its first statement?

I’ve been tested it on Microsoft Edge:

image

image

I can not, too except as I ran to breakpoint. That’s because async functions are transpiled to some helper codes and single stepping would ran into the helper code.

but not only this, my call stack is filled with “junk”
image
this is an example from 3.0 , as you can see both .ts and .js files , helper code

and almost the same code from 2.4.3
Untitled

as you can see, only .ts files , i can freely check each frame on the call stack.

Alright, I’ll dig into that.

Thank you, I will be waiting. :smiley:

Hey,
Any Progress has been made??