Skip to content

print() in isolate in dartium does not output to console.log #4686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sethladd opened this issue Aug 23, 2012 · 18 comments
Closed

print() in isolate in dartium does not output to console.log #4686

sethladd opened this issue Aug 23, 2012 · 18 comments
Labels
type-enhancement A request for a change that isn't a bug
Milestone

Comments

@sethladd
Copy link
Contributor

The print() method, if run from an isolate in dartium, does not print to console.log.

@DartBot
Copy link

DartBot commented Aug 24, 2012

This comment was originally written by [email protected]


Seth,

you mean pure Dart, not DOM-enabled isolate?

If yes, it's be design, but we may want to change it later.


Set owner to [email protected].
Added NeedsInfo label.

@sethladd
Copy link
Contributor Author

Hi Anton, thanks for taking a look.

This was testing print() inside a function running from spawnFunction.

It's not apparent that print won't work from spawnFunction inside Dartium. It would be nice to minimize the differences in behavior between different Dart environments.


Added Triaged label.

@DartBot
Copy link

DartBot commented Aug 24, 2012

This comment was originally written by [email protected]


Thanks, Seth.

That's definitely true, but at least that's not some problem we are not aware of. We'll fix it later.


Added this to the Later milestone.
Removed Type-Defect label.
Added Type-Enhancement label.

@DartBot
Copy link

DartBot commented Sep 26, 2012

This comment was originally written by [email protected]


Clarification request: What do "pure Dart" and "DOM-enabled isolate" mean?

(especially does it imply there actually is a way to get print() and stack-trace output from child isolate in Dartium?)

@DartBot
Copy link

DartBot commented Sep 26, 2012

This comment was originally written by [email protected]


Rupert,

Not all isolates can access DOM for various reasons. For example, due to the way WebKit is implemented to access DOM isolate should leave on the main UI thread. Therefore we have a distinction between pure isolates---isolates which thread-affinity is not restricted, but which cannot really access DOM---and DOM-enabled isolates---which must live on the same thread, but which can access DOM in return.

Does that make sense?

@DartBot
Copy link

DartBot commented Sep 26, 2012

This comment was originally written by [email protected]


Thanks for the speedy response!

So is this the "Light" and "Heavy" Isolates from https://groups.google.com/a/dartlang.org/forum/m/?fromgroups#!topic/misc/NGHcDh_9MUg ?
So is the following fair:

Where can I find documentation about this? (I must be missing from both the language tour Isolates section and the Isolates API doc.) (e.g. How do I create light vs heavy? Can I switch between light until debugged, then heavy for real MT?)

TIA

@DartBot
Copy link

DartBot commented Sep 26, 2012

This comment was originally written by [email protected]


Answered the "how" myself through searching:
http://api.dartlang.org/docs/continuous/dart_html.html#spawnDomFunction
(Curious that neither of my previously referenced docs reference this -- docs bug?)
Coded-up a way to easily switch.

Still interested to know whether my 'heavy' vs. 'light' summary is accurate if possible!
TIA

@DartBot
Copy link

DartBot commented Sep 26, 2012

This comment was originally written by [email protected]


p.s. Just to note: print() successfully outputs to console when using DOM isolate as do exceptions (logging to console and breaking into debugger) but breakpoints still don't work in spawned isolate (with DOM or pure, Dartium or Dart VM).

@DartBot
Copy link

DartBot commented Sep 27, 2012

This comment was originally written by [email protected]


Yes, Rupert, that's exactly original distinction between heavy/light. We just decided to drop it into favour of more straightforward descriptions.

And thanks a lot for bringing the case of debugging pure isolates, we need to imprtove support for those. I'll file a separate bug.

@DartBot
Copy link

DartBot commented Sep 27, 2012

This comment was originally written by [email protected]


Great! Please CC me on the new issue(s). Thanks!

@DartBot
Copy link

DartBot commented Oct 3, 2012

This comment was originally written by [email protected]


Set owner to [email protected].
Removed this from the Later milestone.
Added this to the M3 milestone.

@DartBot
Copy link

DartBot commented Oct 3, 2012

This comment was originally written by [email protected]


See http://code.google.com/p/dart/issues/detail?id=5620

@DartBot
Copy link

DartBot commented Oct 3, 2012

This comment was originally written by [email protected]


Issue #4891 has been merged into this issue.

@anders-sandholm
Copy link
Contributor

Removed this from the M3 milestone.
Added this to the M4 milestone.

@DartBot
Copy link

DartBot commented Mar 28, 2013

This comment was originally written by [email protected]


Set owner to [email protected].

@DartBot
Copy link

DartBot commented Mar 29, 2013

This comment was originally written by [email protected]


Added Started label.

@DartBot
Copy link

DartBot commented Apr 1, 2013

This comment was originally written by [email protected]


Added Fixed label.

@sethladd
Copy link
Contributor Author

sethladd commented Apr 1, 2013

Thanks Anton!

@sethladd sethladd added this to the M4 milestone Apr 1, 2013
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants