akon01
February 24, 2021, 9:31am
#1
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
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.
akon01
February 25, 2021, 8:29am
#3
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:
both can be debuged throu the .ts file.
akon01
March 10, 2021, 7:07pm
#4
UP!
will really appriciate some help
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:
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.
akon01
March 13, 2021, 11:49am
#6
but not only this, my call stack is filled with “junk”
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
as you can see, only .ts files , i can freely check each frame on the call stack.
Alright, I’ll dig into that.
akon01
March 25, 2021, 8:31pm
#8
Thank you, I will be waiting.
akon01
April 27, 2021, 2:49pm
#9
Hey,
Any Progress has been made??