{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/27370","repository_url":"https://api.github.com/repos/dart-lang/sdk","labels_url":"https://api.github.com/repos/dart-lang/sdk/issues/27370/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/sdk/issues/27370/comments","events_url":"https://api.github.com/repos/dart-lang/sdk/issues/27370/events","html_url":"https://github.com/dart-lang/sdk/issues/27370","id":177433801,"number":27370,"title":"setLibraryDebuggable doesn't work as expected","user":{"login":"DanTup","id":1078012,"avatar_url":"https://avatars.githubusercontent.com/u/1078012?v=3","gravatar_id":"","url":"https://api.github.com/users/DanTup","html_url":"https://github.com/DanTup","followers_url":"https://api.github.com/users/DanTup/followers","following_url":"https://api.github.com/users/DanTup/following{/other_user}","gists_url":"https://api.github.com/users/DanTup/gists{/gist_id}","starred_url":"https://api.github.com/users/DanTup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanTup/subscriptions","organizations_url":"https://api.github.com/users/DanTup/orgs","repos_url":"https://api.github.com/users/DanTup/repos","events_url":"https://api.github.com/users/DanTup/events{/privacy}","received_events_url":"https://api.github.com/users/DanTup/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"turnidge","id":4804200,"avatar_url":"https://avatars.githubusercontent.com/u/4804200?v=3","gravatar_id":"","url":"https://api.github.com/users/turnidge","html_url":"https://github.com/turnidge","followers_url":"https://api.github.com/users/turnidge/followers","following_url":"https://api.github.com/users/turnidge/following{/other_user}","gists_url":"https://api.github.com/users/turnidge/gists{/gist_id}","starred_url":"https://api.github.com/users/turnidge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/turnidge/subscriptions","organizations_url":"https://api.github.com/users/turnidge/orgs","repos_url":"https://api.github.com/users/turnidge/repos","events_url":"https://api.github.com/users/turnidge/events{/privacy}","received_events_url":"https://api.github.com/users/turnidge/received_events","type":"User","site_admin":false},"assignees":[{"login":"turnidge","id":4804200,"avatar_url":"https://avatars.githubusercontent.com/u/4804200?v=3","gravatar_id":"","url":"https://api.github.com/users/turnidge","html_url":"https://github.com/turnidge","followers_url":"https://api.github.com/users/turnidge/followers","following_url":"https://api.github.com/users/turnidge/following{/other_user}","gists_url":"https://api.github.com/users/turnidge/gists{/gist_id}","starred_url":"https://api.github.com/users/turnidge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/turnidge/subscriptions","organizations_url":"https://api.github.com/users/turnidge/orgs","repos_url":"https://api.github.com/users/turnidge/repos","events_url":"https://api.github.com/users/turnidge/events{/privacy}","received_events_url":"https://api.github.com/users/turnidge/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-09-16T14:04:15Z","updated_at":"2016-09-16T20:52:41Z","closed_at":null,"body":"It's entirely possible this is user error, but I'm not sure how to debug further.\r\n\r\nFor now, I'm trying to set *all libraries as not-debuggable* for testing; my startup code looks something like this:\r\n\r\n```ts\r\nreturn Promise.all(\r\n\tisolate.libraries.map(library => \r\n\t\tthis.observatory.setLibraryDebuggable(isolateRef.id, library.id, false)\r\n\t)\r\n);\r\n```\r\n\r\nI can see the requests all being sent and success responses:\r\n\r\n```text\r\n==> {\"id\":\"4\",\"method\":\"setExceptionPauseMode\",\"params\":{\"isolateId\":\"isolates/360410364\",\"mode\":\"Unhandled\"}}\r\n==> {\"id\":\"5\",\"method\":\"setLibraryDebuggable\",\"params\":{\"isolateId\":\"isolates/360410364\",\"libraryId\":\"libraries/0\",\"isDebuggable\":false}}\r\n==> {\"id\":\"6\",\"method\":\"setLibraryDebuggable\",\"params\":{\"isolateId\":\"isolates/360410364\",\"libraryId\":\"libraries/1\",\"isDebuggable\":false}}\r\n==> {\"id\":\"7\",\"method\":\"setLibraryDebuggable\",\"params\":{\"isolateId\":\"isolates/360410364\",\"libraryId\":\"libraries/2\",\"isDebuggable\":false}}\r\n==> {\"id\":\"8\",\"method\":\"setLibraryDebuggable\",\"params\":{\"isolateId\":\"isolates/360410364\",\"libraryId\":\"libraries/3\",\"isDebuggable\":false}}\r\n// SNIP\r\n```\r\n\r\n```text\r\n<== {\"jsonrpc\":\"2.0\", \"result\":{\"type\":\"Success\"},\"id\":\"5\"}\r\n<== {\"jsonrpc\":\"2.0\", \"result\":{\"type\":\"Success\"},\"id\":\"6\"}\r\n<== {\"jsonrpc\":\"2.0\", \"result\":{\"type\":\"Success\"},\"id\":\"7\"}\r\n<== {\"jsonrpc\":\"2.0\", \"result\":{\"type\":\"Success\"},\"id\":\"8\"}\r\n// SNIP\r\n```\r\n\r\nHowever, it doesn't seem to do what I expect. Here's my sample program:\r\n\r\n```dart\r\nmain() {\r\n  print(\"Danny\");\r\n}\r\n```\r\n\r\nI have a breakpoint on line 2 and I'm pressing Step Into after it's hit. I end up in broken inside print, but I expected it to just step over."},"comment":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/comments/247706299","html_url":"https://github.com/dart-lang/sdk/issues/27370#issuecomment-247706299","issue_url":"https://api.github.com/repos/dart-lang/sdk/issues/27370","id":247706299,"user":{"login":"mhausner","id":8368434,"avatar_url":"https://avatars.githubusercontent.com/u/8368434?v=3","gravatar_id":"","url":"https://api.github.com/users/mhausner","html_url":"https://github.com/mhausner","followers_url":"https://api.github.com/users/mhausner/followers","following_url":"https://api.github.com/users/mhausner/following{/other_user}","gists_url":"https://api.github.com/users/mhausner/gists{/gist_id}","starred_url":"https://api.github.com/users/mhausner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhausner/subscriptions","organizations_url":"https://api.github.com/users/mhausner/orgs","repos_url":"https://api.github.com/users/mhausner/repos","events_url":"https://api.github.com/users/mhausner/events{/privacy}","received_events_url":"https://api.github.com/users/mhausner/received_events","type":"User","site_admin":false},"created_at":"2016-09-16T20:52:41Z","updated_at":"2016-09-16T20:52:41Z","body":"The culprit is in this code:\r\n\r\n```\r\nbool Debugger::IsDebuggable(const Function& func) {\r\n  if (!func.is_debuggable()) {\r\n    return false;\r\n  }\r\n  if (ServiceIsolate::IsRunning()) {\r\n    return true;  <<<<<<<<<\r\n  }\r\n  const Class& cls = Class::Handle(func.Owner());\r\n  const Library& lib = Library::Handle(cls.library());\r\n  return lib.IsDebuggable();\r\n}\r\n````"}}
{"actor":{"display_login":"mhausner"}}