Skip to content
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

Editor breakpoints in Isolates are not working #9209

Closed
DartBot opened this issue Mar 16, 2013 · 19 comments
Closed

Editor breakpoints in Isolates are not working #9209

DartBot opened this issue Mar 16, 2013 · 19 comments
Assignees
Labels
Milestone

Comments

@DartBot
Copy link

DartBot commented Mar 16, 2013

This issue was originally filed by nistvan....@gmail.com


What steps will reproduce the problem?

I've created a very basic web project with the following Dart code:

import 'dart:html';
import 'dart:isolate';

void main() {
  IsolateSink isolateSink = streamSpawnFunction(myIsolateEntryPoint);
  MessageBox isolateMessageBox = new MessageBox();
  isolateSink.add(isolateMessageBox.sink);
  isolateMessageBox.stream.listen((String data) {
    print(data);
  });
}

void myIsolateEntryPoint() {
  stream.listen((IsolateSink messageBoxSink) {
    messageBoxSink.add("Test");
  });
}

This will print "Test" into Dartium's console so it's working as it should.

If i place break points in Dart Editor on the body of myIsolateEntryPoint() the VM will not pause during execution. The same thing works in the main() function.

What is the expected output? What do you see instead?

The VM should stop inside the isolate code at the breakpoint but it doesn't do this at the moment.

What version of the product are you using? On what operating system?

Dart Editor version 0.4.1_r19425
Dart SDK version 0.4.1.0_r19425
Windows 8 x64 Pro

Please provide any additional information below.

For me it seems that the debugger client running in the Dart Editor is only seeing the main isolate. If i do something in the isolate code which yields in a runtime exception (like executing splice on a null String object) i won't see any message in the editor console.

@DartBot
Copy link
Author

DartBot commented Mar 16, 2013

This comment was originally written by nistv...@gmail.com


splice = slice of course :)

@kasperl
Copy link

kasperl commented Mar 18, 2013

Added Area-VM, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Apr 17, 2013

This comment was originally written by jim.trai...@jptrainor.com


Big problem! Still happening in 0.4.7_r21548. Debugging unit test's is now much harder - cannot set break points in the test!

@iposva-google
Copy link
Contributor

Removed Priority-Medium label.
Added Priority-Unassigned label.

@DartBot
Copy link
Author

DartBot commented Jul 22, 2013

This comment was originally written by nistv...@gmail.com


Just tried and this still doesn't work with:

Dart Editor version 0.6.5_r25017
Dart SDK version 0.6.5.0_r25017

Working with code containing Isolates is painful without this being fixed.

@iposva-google
Copy link
Contributor

There will be a couple of changes needed in multiple components:

  • The debugging protocol needs to allow newly created isolates to stop at the entry point.
  • Editor debugger needs to be updated to allow specifying breakpoints in specific isolates.
  • Dartium debugger has to recognize and handle multiple isolates.

Currently the standalone protocol allows for pausing and inspecting different isolates, but not setting any breakpoints.

I am making this the bug tracking the overall feature request of setting breakpoints in isolates.


cc @devoncarew.
cc @jacob314.
Set owner to @mhausner.
Removed Type-Defect label.
Added Type-Enhancement, Area-Dartium, Area-Editor labels.

@clayberg
Copy link

clayberg commented Aug 8, 2013

Added this to the Later milestone.
Removed Priority-Unassigned label.
Added Priority-Medium label.

@devoncarew
Copy link
Member

Issue #14225 has been merged into this issue.

@iposva-google
Copy link
Contributor

I moved "- The debugging protocol needs to allow newly created isolates to stop at the entry point." into its own separate issue #14227. Although as long as the current support for debugging isolates is not surfaced through the UI implementing this additional feature is moot.


cc @mhausner.
Removed the owner.
Removed Area-VM label.
Added Debugger label.

@DartBot
Copy link
Author

DartBot commented Jan 16, 2014

This comment was originally written by nistvan.8...@gmail.com


This still doesn't work. With the new Isolate API this can be reproduced like this:

* Command line apps:

import 'dart:isolate';
import 'dart:async';

void myIsolateEntryPoint(SendPort send) {
  send.send("Test!");
}

main() {
  var res = new ReceivePort();
  Future<Isolate> remote = Isolate.spawn(doThing, res.sendPort);
  res.listen((String data) => print(data));
}

* Web apps:

  • main.dart

import 'dart:isolate';
import 'dart:async';

main() {
  var res = new ReceivePort();
  Future<Isolate> remote = Isolate.spawnUri(Uri.parse('iso.dart'), null, res.sendPort);
  res.listen((String data) => print(data));
}

  • iso.dart

import "dart:isolate";

void main(args, SendPort send) {
  send.send("Test!");
}

@DartBot
Copy link
Author

DartBot commented Apr 15, 2014

This comment was originally written by nistva...@gmail.com


Can you give us an estimate when you will put this on to the development roadmap?

@iposva-google
Copy link
Contributor

Set owner to @clayberg.
Removed Area-Dartium label.
Added Accepted label.

@clayberg
Copy link

Set owner to @devoncarew.
Removed this from the Later milestone.
Added this to the 1.4 milestone.

@kasperl
Copy link

kasperl commented May 8, 2014

Removed this from the 1.4 milestone.
Added this to the 1.5 milestone.

@kasperl
Copy link

kasperl commented Jun 4, 2014

Removed this from the 1.5 milestone.
Added this to the 1.6 milestone.

@anders-sandholm
Copy link
Contributor

Issue #4890 has been merged into this issue.


cc @clayberg.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the 1.6 milestone.
Added Oldschool-Milestone-1.6 label.

@sethladd
Copy link
Contributor

Added NotPlanned label.

@danrubel
Copy link

We really need to do this.... reopening.


Added this to the 1.6 milestone.
Removed Priority-Medium, Oldschool-Milestone-1.6 labels.
Added Priority-High, Triaged labels.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants