kiddkai / atom-node-debugger

A Nodejs Debugger For Atom
MIT License
265 stars 75 forks source link

Cannot see object values - just tells me 'no frames' #174

Open RichardJECooke opened 8 years ago

RichardJECooke commented 8 years ago

untitled

lell commented 7 years ago

I'm having this problem too. I'm developing a network application and it stops sending/receiving data, so I'd like to pause it and view a stack trace of the current execution state, but I see "no frames".

lell commented 7 years ago

PS --- attached screenshot. I realise my program probably has a bug, but if it's crashed then I'd like to know the stack trace for the crash, or if it's not crashed I'd like to know the stack trace at the time of the pause. Any pointers would be greatly appreciated! screen shot 2016-08-02 at 00 27 30

codecontemplator commented 7 years ago

@RichardJECooke I do not understand. Would you mind trying to explain again?

RichardJECooke commented 7 years ago

I don't understand either, it just says 'no frames'.

lell commented 7 years ago

Hey all, I think that this situation occurs when the main() {} function reaches its end before all isolates finish, and then one of those remaining isolates raises an error. Looks like after reaching the end of the main() {} function, the program will continue until all isolates end. However, the debugging features of atom (at least those that handle displaying stack traces upon error), terminate when the end of the main() {} function is reached, meaning that stack traces for isolates that raise errors after that point are not triggered. It's possible that this "no frames" behaviour can be avoided if you add "await ..." commands at the end of the main() {} function for all remaining isolates.

I'm not sure what's supposed to happen in dart if main() {} ends before all isolates, but I can confirm that on my computer the isolates continue to run (which seems to be reasonable behaviour). So I would guess that this a bug in atom, albiet one that could have an easy work around (adding the awaits).