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

VM service getObject response for scripts no longer include "source" for SDK libraries in v2.10 dev SDKs #43207

Closed
DanTup opened this issue Aug 27, 2020 · 13 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Comments

@DanTup
Copy link
Collaborator

DanTup commented Aug 27, 2020

When using a Dart v2.10 dev SDK, the "source" property appears to be missing from the response of getObject call to the VM Service for dart:core/print.dart.

Left is v2.9, right is v2.10.0-56.0.dev.

Screenshot 2020-08-27 at 10 12 39

We use this in VS Code when the user steps into SDK libraries (otherwise the user will just see <source not available>).

cc @bkonyi

@mraleph mraleph added the area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. label Aug 27, 2020
DanTup added a commit to Dart-Code/Dart-Code that referenced this issue Aug 27, 2020
@DanTup
Copy link
Collaborator Author

DanTup commented Sep 1, 2020

@bkonyi do you know if this is an intended change or a bug? I've been noticing it a lot more the last few days while debugging using nightly SDK builds, it's much more difficult to debug things.

@bkonyi
Copy link
Contributor

bkonyi commented Sep 1, 2020

No, that's not intended. It's possible someone was messing with build rules or how the platform snapshot is linked in and managed to remove it. I'll have to take a look.

@bkonyi bkonyi self-assigned this Sep 1, 2020
@bkonyi
Copy link
Contributor

bkonyi commented Sep 3, 2020

Was this a Flutter application? Is this still an issue? I'm unable to reproduce with the standalone VM.

@DanTup
Copy link
Collaborator Author

DanTup commented Sep 3, 2020

It was just Dart. I can repro using the most recently nightly from http://gsdview.appspot.com/dart-archive/channels/be/raw/latest/sdk/:

Dart SDK version: 2.10.0-edge.ca25787ad4fa0a6429679e38bec272957e0445b6 (be) (Thu Sep 3 16:55:25 2020 +0000) on "macos_x64"

I created a simple script that used print() then tried to step into it:

[6:27:02 PM] [VmService] ==> {"id":"44","jsonrpc":"2.0","method":"resume","params":{"isolateId":"isolates/818684413507763","step":"Into"}}
[6:27:02 PM] [VmService] <== {"jsonrpc":"2.0","result":{"type":"Success"},"id":"44"}
[6:27:02 PM] [VmService] <== {"jsonrpc":"2.0","method":"streamNotify","params":{"streamId":"Debug","event":{"type":"Event","kind":"Resume","isolate":{"type":"@Isolate","id":"isolates/818684413507763","name":"main","number":"818684413507763","isSystemIsolate":false},"timestamp":1599154022005,"topFrame":{"type":"Frame","kind":"Regular","location":{"type":"SourceLocation","script":{"type":"@Script","fixedId":true,"id":"libraries/@19027873/scripts/file%3A%2F%2F%2FUsers%2Fdanny%2FDesktop%2Fdart_sample%2Fbin%2Fmain.dart/1745501d02d","uri":"file:///Users/danny/Desktop/dart_sample/bin/main.dart","_kind":"kernel"},"tokenPos":211},"function":{"type":"@Function","fixedId":true,"id":"libraries/@19027873/closures/10","name":"async_op","_vmName":":async_op","owner":{"type":"@Function","fixedId":true,"id":"libraries/@19027873/functions/main","name":"main","owner":{"type":"@Library","fixedId":true,"id":"libraries/@19027873","name":"","uri":"file:///Users/danny/Desktop/dart_sample/bin/main.dart"},"_kind":"RegularFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"_kind":"ClosureFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"code":{"type":"@Code","fixedId":true,"id":"code/81b725e21-111aa5480","name":"[Unoptimized] main","_vmName":"[Unoptimized] async_op","kind":"Dart","_optimized":false,"_intrinsic":false,"_native":false},"vars":[{"type":"BoundVariable","name":"danny","value":{"type":"@Instance","_vmType":"String","class":{"type":"@Class","fixedId":true,"id":"classes/81","name":"_OneByteString","_vmName":"_OneByteString@0150898"},"kind":"String","id":"objects/27","length":4,"valueAsString":"test"},"declarationTokenPos":177,"scopeStartTokenPos":184,"scopeEndTokenPos":211}],"index":0}}}}
[6:27:02 PM] [VmService] <== {"jsonrpc":"2.0","method":"streamNotify","params":{"streamId":"Debug","event":{"type":"Event","kind":"PauseBreakpoint","isolate":{"type":"@Isolate","id":"isolates/818684413507763","name":"main","number":"818684413507763","isSystemIsolate":false},"timestamp":1599154022006,"pauseBreakpoints":[],"topFrame":{"type":"Frame","kind":"Regular","location":{"type":"SourceLocation","script":{"type":"@Script","fixedId":true,"id":"libraries/@15069316/scripts/dart%3Aio%2Fdirectory.dart/0","uri":"dart:io/directory.dart","_kind":"kernel"},"tokenPos":5230},"function":{"type":"@Function","fixedId":true,"id":"classes/941/functions/get%3Acurrent","name":"current","_vmName":"get:current","owner":{"type":"@Class","fixedId":true,"id":"classes/941","name":"Directory"},"_kind":"GetterFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"code":{"type":"@Code","fixedId":true,"id":"code/81bc8e8a5-111aa8b60","name":"[Unoptimized] Directory.current","_vmName":"[Unoptimized] current","kind":"Dart","_optimized":false,"_intrinsic":false,"_native":false},"vars":[],"index":0}}}}
[6:27:02 PM] [VmService] ==> {"id":"45","jsonrpc":"2.0","method":"getStack","params":{"isolateId":"isolates/818684413507763"}}
[6:27:02 PM] [VmService] <== {"jsonrpc":"2.0","result":{"type":"Stack","frames":[{"type":"Frame","kind":"Regular","location":{"type":"SourceLocation","script":{"type":"@Script","fixedId":true,"id":"libraries/@15069316/scripts/dart%3Aio%2Fdirectory.dart/0","uri":"dart:io/directory.dart","_kind":"kernel"},"tokenPos":5230},"function":{"type":"@Function","fixedId":true,"id":"classes/941/functions/get%3Acurrent","name":"current","_vmName":"get:current","owner":{"type":"@Class","fixedId":true,"id":"classes/941","name":"Directory"},"_kind":"GetterFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"code":{"type":"@Code","fixedId":true,"id":"code/81bc8e8a5-111aa8b60","name":"[Unoptimized] Directory.current","_vmName":"[Unoptimized] current","kind":"Dart","_optimized":false,"_intrinsic":false,"_native":false},"vars":[],"index":0},{"type":"Frame","kind":"Regular","location":{"type":"SourceLocation","script":{"type":"@Script","fixedId":true,"id":"libraries/@19027873/scripts/file%3A%2F%2F%2FUsers%2Fdanny%2FDesktop%2Fdart_sample%2Fbin%2Fmain.dart/1745501d02d","uri":"file:///Users/danny/Desktop/dart_sample/bin/main.dart","_kind":"kernel"},"tokenPos":211},"function":{"type":"@Function","fixedId":true,"id":"libraries/@19027873/closures/10","name":"async_op","_vmName":":async_op","owner":{"type":"@Function","fixedId":true,"id":"libraries/@19027873/functions/main","name":"main","owner":{"type":"@Library","fixedId":true,"id":"libraries/@19027873","name":"","uri":"file:///Users/danny/Desktop/dart_sample/bin/main.dart"},"_kind":"RegularFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"_kind":"ClosureFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"code":{"type":"@Code","fixedId":true,"id":"code/81b725e21-111aa5480","name":"[Unoptimized] main","_vmName":"[Unoptimized] async_op","kind":"Dart","_optimized":false,"_intrinsic":false,"_native":false},"vars":[{"type":"BoundVariable","name":"danny","value":{"type":"@Instance","_vmType":"String","class":{"type":"@Class","fixedId":true,"id":"classes/81","name":"_OneByteString","_vmName":"_OneByteString@0150898"},"kind":"String","id":"objects/28","length":4,"valueAsString":"test"},"declarationTokenPos":177,"scopeStartTokenPos":184,"scopeEndTokenPos":211}],"index":1},{"type":"Frame","kind":"Regular","location":{"type":"SourceLocation","script":{"type":"@Script","fixedId":true,"id":"libraries/@1026248/scripts/dart%3Aisolate-patch%2Fisolate_patch.dart/0","uri":"dart:isolate-patch/isolate_patch.dart","_kind":"kernel"},"tokenPos":8821},"function":{"type":"@Function","fixedId":true,"id":"libraries/@1026248/closures/9","name":"<anonymous closure>","owner":{"type":"@Function","fixedId":true,"id":"libraries/@1026248/functions/_startIsolate%401026248","name":"_startIsolate","_vmName":"_startIsolate@1026248","owner":{"type":"@Library","fixedId":true,"id":"libraries/@1026248","name":"dart.isolate","uri":"dart:isolate"},"_kind":"RegularFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"_kind":"ClosureFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"code":{"type":"@Code","fixedId":true,"id":"code/81b7255c9-111aa32d0","name":"[Unoptimized] _startIsolate.<anonymous closure>","_vmName":"[Unoptimized] <anonymous closure>","kind":"Dart","_optimized":false,"_intrinsic":false,"_native":false},"vars":[{"type":"BoundVariable","name":"port","value":{"type":"@Instance","_vmType":"ReceivePort","class":{"type":"@Class","fixedId":true,"id":"classes/67","name":"_RawReceivePortImpl","_vmName":"_RawReceivePortImpl@1026248"},"kind":"PlainInstance","id":"objects/29"},"declarationTokenPos":8557,"scopeStartTokenPos":7427,"scopeEndTokenPos":8924},{"type":"BoundVariable","name":"isSpawnUri","value":{"type":"@Instance","_vmType":"Bool","class":{"type":"@Class","fixedId":true,"id":"classes/55","name":"bool"},"kind":"Bool","fixedId":true,"id":"objects/bool-true","valueAsString":"true"},"declarationTokenPos":7493,"scopeStartTokenPos":7427,"scopeEndTokenPos":8924},{"type":"BoundVariable","name":"entryPoint","value":{"type":"@Instance","_vmType":"Closure","class":{"type":"@Class","fixedId":true,"id":"classes/49","name":"_Closure","_vmName":"_Closure@0150898"},"kind":"Closure","id":"objects/30","closureFunction":{"type":"@Function","fixedId":true,"id":"libraries/@19027873/implicit_closures/0","name":"main","owner":{"type":"@Function","fixedId":true,"id":"libraries/@19027873/functions/main","name":"main","owner":{"type":"@Library","fixedId":true,"id":"libraries/@19027873","name":"","uri":"file:///Users/danny/Desktop/dart_sample/bin/main.dart"},"_kind":"RegularFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"_kind":"ImplicitClosureFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"closureContext":{"type":"@Instance","_vmType":"Context","class":{"type":"@Class","fixedId":true,"id":"classes/152","name":"Null"},"kind":"Null","fixedId":true,"id":"objects/null","valueAsString":"null"}},"declarationTokenPos":7427,"scopeStartTokenPos":7427,"scopeEndTokenPos":8924},{"type":"BoundVariable","name":"args","value":{"type":"@Instance","_vmType":"Array","class":{"type":"@Class","fixedId":true,"id":"classes/78","name":"_List","_vmName":"_List@0150898"},"kind":"List","id":"objects/31","length":0},"declarationTokenPos":7457,"scopeStartTokenPos":7427,"scopeEndTokenPos":8924},{"type":"BoundVariable","name":"message","value":{"type":"@Instance","_vmType":"null","class":{"type":"@Class","fixedId":true,"id":"classes/152","name":"Null"},"kind":"Null","fixedId":true,"id":"objects/null","valueAsString":"null"},"declarationTokenPos":7475,"scopeStartTokenPos":7427,"scopeEndTokenPos":8924},{"type":"BoundVariable","name":"_","value":{"type":"@Instance","_vmType":"null","class":{"type":"@Class","fixedId":true,"id":"classes/152","name":"Null"},"kind":"Null","fixedId":true,"id":"objects/null","valueAsString":"null"},"declarationTokenPos":8604,"scopeStartTokenPos":8604,"scopeEndTokenPos":8924}],"index":2},{"type":"Frame","kind":"Regular","location":{"type":"SourceLocation","script":{"type":"@Script","fixedId":true,"id":"libraries/@1026248/scripts/dart%3Aisolate-patch%2Fisolate_patch.dart/0","uri":"dart:isolate-patch/isolate_patch.dart","_kind":"kernel"},"tokenPos":4911},"function":{"type":"@Function","fixedId":true,"id":"classes/67/functions/_handleMessage%401026248","name":"_handleMessage","_vmName":"_handleMessage@1026248","owner":{"type":"@Class","fixedId":true,"id":"classes/67","name":"_RawReceivePortImpl","_vmName":"_RawReceivePortImpl@1026248"},"_kind":"RegularFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"code":{"type":"@Code","fixedId":true,"id":"code/81b72551f-111aa2ec0","name":"[Unoptimized] _RawReceivePortImpl._handleMessage","_vmName":"[Unoptimized] _handleMessage","kind":"Dart","_optimized":false,"_intrinsic":false,"_native":false},"vars":[{"type":"BoundVariable","name":"handler","value":{"type":"@Instance","_vmType":"Closure","class":{"type":"@Class","fixedId":true,"id":"classes/49","name":"_Closure","_vmName":"_Closure@0150898"},"kind":"Closure","id":"objects/32","closureFunction":{"type":"@Function","fixedId":true,"id":"libraries/@1026248/closures/9","name":"<anonymous closure>","owner":{"type":"@Function","fixedId":true,"id":"libraries/@1026248/functions/_startIsolate%401026248","name":"_startIsolate","_vmName":"_startIsolate@1026248","owner":{"type":"@Library","fixedId":true,"id":"libraries/@1026248","name":"dart.isolate","uri":"dart:isolate"},"_kind":"RegularFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"_kind":"ClosureFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"closureContext":{"type":"@Context","id":"objects/33","length":5}},"declarationTokenPos":4672,"scopeStartTokenPos":4672,"scopeEndTokenPos":4961},{"type":"BoundVariable","name":"message","value":{"type":"@Instance","_vmType":"null","class":{"type":"@Class","fixedId":true,"id":"classes/152","name":"Null"},"kind":"Null","fixedId":true,"id":"objects/null","valueAsString":"null"},"declarationTokenPos":4685,"scopeStartTokenPos":4685,"scopeEndTokenPos":4961}],"index":3}],"asyncCausalFrames":[{"type":"Frame","kind":"Regular","location":{"type":"SourceLocation","script":{"type":"@Script","fixedId":true,"id":"libraries/@15069316/scripts/dart%3Aio%2Fdirectory.dart/0","uri":"dart:io/directory.dart","_kind":"kernel"},"tokenPos":5230},"function":{"type":"@Function","fixedId":true,"id":"classes/941/functions/get%3Acurrent","name":"current","_vmName":"get:current","owner":{"type":"@Class","fixedId":true,"id":"classes/941","name":"Directory"},"_kind":"GetterFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"code":{"type":"@Code","fixedId":true,"id":"code/81bc8e8a5-111aa8b60","name":"[Unoptimized] Directory.current","_vmName":"[Unoptimized] current","kind":"Dart","_optimized":false,"_intrinsic":false,"_native":false},"vars":[],"index":0},{"type":"Frame","kind":"Regular","location":{"type":"SourceLocation","script":{"type":"@Script","fixedId":true,"id":"libraries/@19027873/scripts/file%3A%2F%2F%2FUsers%2Fdanny%2FDesktop%2Fdart_sample%2Fbin%2Fmain.dart/1745501d02d","uri":"file:///Users/danny/Desktop/dart_sample/bin/main.dart","_kind":"kernel"},"tokenPos":211},"function":{"type":"@Function","fixedId":true,"id":"libraries/@19027873/closures/10","name":"async_op","_vmName":":async_op","owner":{"type":"@Function","fixedId":true,"id":"libraries/@19027873/functions/main","name":"main","owner":{"type":"@Library","fixedId":true,"id":"libraries/@19027873","name":"","uri":"file:///Users/danny/Desktop/dart_sample/bin/main.dart"},"_kind":"RegularFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"_kind":"ClosureFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"code":{"type":"@Code","fixedId":true,"id":"code/81b725e21-111aa5480","name":"[Unoptimized] main","_vmName":"[Unoptimized] async_op","kind":"Dart","_optimized":false,"_intrinsic":false,"_native":false},"vars":[{"type":"BoundVariable","name":"danny","value":{"type":"@Instance","_vmType":"String","class":{"type":"@Class","fixedId":true,"id":"classes/81","name":"_OneByteString","_vmName":"_OneByteString@0150898"},"kind":"String","id":"objects/34","length":4,"valueAsString":"test"},"declarationTokenPos":177,"scopeStartTokenPos":184,"scopeEndTokenPos":211}],"index":1},{"type":"Frame","kind":"AsyncCausal","location":{"type":"SourceLocation","script":{"type":"@Script","fixedId":true,"id":"libraries/@19027873/scripts/file%3A%2F%2F%2FUsers%2Fdanny%2FDesktop%2Fdart_sample%2Fbin%2Fmain.dart/1745501d02d","uri":"file:///Users/danny/Desktop/dart_sample/bin/main.dart","_kind":"kernel"},"tokenPos":-1},"function":{"type":"@Function","fixedId":true,"id":"libraries/@19027873/implicit_closures/0","name":"main","owner":{"type":"@Function","fixedId":true,"id":"libraries/@19027873/functions/main","name":"main","owner":{"type":"@Library","fixedId":true,"id":"libraries/@19027873","name":"","uri":"file:///Users/danny/Desktop/dart_sample/bin/main.dart"},"_kind":"RegularFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"_kind":"ImplicitClosureFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"code":{"type":"@Code","fixedId":true,"id":"code/81b7257b9-111aa4120","name":"[Unoptimized] main","kind":"Dart","_optimized":false,"_intrinsic":false,"_native":false},"index":2},{"type":"Frame","kind":"AsyncCausal","location":{"type":"SourceLocation","script":{"type":"@Script","fixedId":true,"id":"libraries/@0150898/scripts/dart%3Acore-patch%2Ffunction.dart/0","uri":"dart:core-patch/function.dart","_kind":"kernel"},"tokenPos":-1},"function":{"type":"@Function","fixedId":true,"id":"classes/49/dispatchers/2","name":"call","_vmName":"dyn:call","owner":{"type":"@Class","fixedId":true,"id":"classes/49","name":"_Closure","_vmName":"_Closure@0150898"},"_kind":"InvokeFieldDispatcher","static":false,"const":false,"_intrinsic":false,"_native":false},"code":{"type":"@Code","fixedId":true,"id":"code/81b725565-111aa2f80","name":"[Unoptimized] _Closure.call","_vmName":"[Unoptimized] call","kind":"Dart","_optimized":false,"_intrinsic":false,"_native":false},"index":3},{"type":"Frame","kind":"AsyncCausal","location":{"type":"SourceLocation","script":{"type":"@Script","fixedId":true,"id":"libraries/@1026248/scripts/dart%3Aisolate-patch%2Fisolate_patch.dart/0","uri":"dart:isolate-patch/isolate_patch.dart","_kind":"kernel"},"tokenPos":8821},"function":{"type":"@Function","fixedId":true,"id":"libraries/@1026248/closures/9","name":"<anonymous closure>","owner":{"type":"@Function","fixedId":true,"id":"libraries/@1026248/functions/_startIsolate%401026248","name":"_startIsolate","_vmName":"_startIsolate@1026248","owner":{"type":"@Library","fixedId":true,"id":"libraries/@1026248","name":"dart.isolate","uri":"dart:isolate"},"_kind":"RegularFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"_kind":"ClosureFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"code":{"type":"@Code","fixedId":true,"id":"code/81b7255c9-111aa32d0","name":"[Unoptimized] _startIsolate.<anonymous closure>","_vmName":"[Unoptimized] <anonymous closure>","kind":"Dart","_optimized":false,"_intrinsic":false,"_native":false},"index":4},{"type":"Frame","kind":"AsyncCausal","location":{"type":"SourceLocation","script":{"type":"@Script","fixedId":true,"id":"libraries/@0150898/scripts/dart%3Acore-patch%2Ffunction.dart/0","uri":"dart:core-patch/function.dart","_kind":"kernel"},"tokenPos":-1},"function":{"type":"@Function","fixedId":true,"id":"classes/49/dispatchers/2","name":"call","_vmName":"dyn:call","owner":{"type":"@Class","fixedId":true,"id":"classes/49","name":"_Closure","_vmName":"_Closure@0150898"},"_kind":"InvokeFieldDispatcher","static":false,"const":false,"_intrinsic":false,"_native":false},"code":{"type":"@Code","fixedId":true,"id":"code/81b725565-111aa2f80","name":"[Unoptimized] _Closure.call","_vmName":"[Unoptimized] call","kind":"Dart","_optimized":false,"_intrinsic":false,"_native":false},"index":5},{"type":"Frame","kind":"AsyncCausal","location":{"type":"SourceLocation","script":{"type":"@Script","fixedId":true,"id":"libraries/@1026248/scripts/dart%3Aisolate-patch%2Fisolate_patch.dart/0","uri":"dart:isolate-patch/isolate_patch.dart","_kind":"kernel"},"tokenPos":4911},"function":{"type":"@Function","fixedId":true,"id":"classes/67/functions/_handleMessage%401026248","name":"_handleMessage","_vmName":"_handleMessage@1026248","owner":{"type":"@Class","fixedId":true,"id":"classes/67","name":"_RawReceivePortImpl","_vmName":"_RawReceivePortImpl@1026248"},"_kind":"RegularFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"code":{"type":"@Code","fixedId":true,"id":"code/81b72551f-111aa2ec0","name":"[Unoptimized] _RawReceivePortImpl._handleMessage","_vmName":"[Unoptimized] _handleMessage","kind":"Dart","_optimized":false,"_intrinsic":false,"_native":false},"index":6}],"awaiterFrames":[{"type":"Frame","kind":"Regular","location":{"type":"SourceLocation","script":{"type":"@Script","fixedId":true,"id":"libraries/@15069316/scripts/dart%3Aio%2Fdirectory.dart/0","uri":"dart:io/directory.dart","_kind":"kernel"},"tokenPos":5230},"function":{"type":"@Function","fixedId":true,"id":"classes/941/functions/get%3Acurrent","name":"current","_vmName":"get:current","owner":{"type":"@Class","fixedId":true,"id":"classes/941","name":"Directory"},"_kind":"GetterFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"code":{"type":"@Code","fixedId":true,"id":"code/81bc8e8a5-111aa8b60","name":"[Unoptimized] Directory.current","_vmName":"[Unoptimized] current","kind":"Dart","_optimized":false,"_intrinsic":false,"_native":false},"vars":[],"index":0},{"type":"Frame","kind":"AsyncActivation","location":{"type":"SourceLocation","script":{"type":"@Script","fixedId":true,"id":"libraries/@19027873/scripts/file%3A%2F%2F%2FUsers%2Fdanny%2FDesktop%2Fdart_sample%2Fbin%2Fmain.dart/1745501d02d","uri":"file:///Users/danny/Desktop/dart_sample/bin/main.dart","_kind":"kernel"},"tokenPos":211},"function":{"type":"@Function","fixedId":true,"id":"libraries/@19027873/closures/10","name":"async_op","_vmName":":async_op","owner":{"type":"@Function","fixedId":true,"id":"libraries/@19027873/functions/main","name":"main","owner":{"type":"@Library","fixedId":true,"id":"libraries/@19027873","name":"","uri":"file:///Users/danny/Desktop/dart_sample/bin/main.dart"},"_kind":"RegularFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"_kind":"ClosureFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"code":{"type":"@Code","fixedId":true,"id":"code/81b725e21-111aa5480","name":"[Unoptimized] main","_vmName":"[Unoptimized] async_op","kind":"Dart","_optimized":false,"_intrinsic":false,"_native":false},"vars":[{"type":"BoundVariable","name":"danny","value":{"type":"@Instance","_vmType":"String","class":{"type":"@Class","fixedId":true,"id":"classes/81","name":"_OneByteString","_vmName":"_OneByteString@0150898"},"kind":"String","id":"objects/35","length":4,"valueAsString":"test"},"declarationTokenPos":177,"scopeStartTokenPos":184,"scopeEndTokenPos":211}],"index":1},{"type":"Frame","kind":"Regular","location":{"type":"SourceLocation","script":{"type":"@Script","fixedId":true,"id":"libraries/@1026248/scripts/dart%3Aisolate-patch%2Fisolate_patch.dart/0","uri":"dart:isolate-patch/isolate_patch.dart","_kind":"kernel"},"tokenPos":8821},"function":{"type":"@Function","fixedId":true,"id":"libraries/@1026248/closures/9","name":"<anonymous closure>","owner":{"type":"@Function","fixedId":true,"id":"libraries/@1026248/functions/_startIsolate%401026248","name":"_startIsolate","_vmName":"_startIsolate@1026248","owner":{"type":"@Library","fixedId":true,"id":"libraries/@1026248","name":"dart.isolate","uri":"dart:isolate"},"_kind":"RegularFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"_kind":"ClosureFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"code":{"type":"@Code","fixedId":true,"id":"code/81b7255c9-111aa32d0","name":"[Unoptimized] _startIsolate.<anonymous closure>","_vmName":"[Unoptimized] <anonymous closure>","kind":"Dart","_optimized":false,"_intrinsic":false,"_native":false},"vars":[{"type":"BoundVariable","name":"port","value":{"type":"@Instance","_vmType":"ReceivePort","class":{"type":"@Class","fixedId":true,"id":"classes/67","name":"_RawReceivePortImpl","_vmName":"_RawReceivePortImpl@1026248"},"kind":"PlainInstance","id":"objects/36"},"declarationTokenPos":8557,"scopeStartTokenPos":7427,"scopeEndTokenPos":8924},{"type":"BoundVariable","name":"isSpawnUri","value":{"type":"@Instance","_vmType":"Bool","class":{"type":"@Class","fixedId":true,"id":"classes/55","name":"bool"},"kind":"Bool","fixedId":true,"id":"objects/bool-true","valueAsString":"true"},"declarationTokenPos":7493,"scopeStartTokenPos":7427,"scopeEndTokenPos":8924},{"type":"BoundVariable","name":"entryPoint","value":{"type":"@Instance","_vmType":"Closure","class":{"type":"@Class","fixedId":true,"id":"classes/49","name":"_Closure","_vmName":"_Closure@0150898"},"kind":"Closure","id":"objects/37","closureFunction":{"type":"@Function","fixedId":true,"id":"libraries/@19027873/implicit_closures/0","name":"main","owner":{"type":"@Function","fixedId":true,"id":"libraries/@19027873/functions/main","name":"main","owner":{"type":"@Library","fixedId":true,"id":"libraries/@19027873","name":"","uri":"file:///Users/danny/Desktop/dart_sample/bin/main.dart"},"_kind":"RegularFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"_kind":"ImplicitClosureFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"closureContext":{"type":"@Instance","_vmType":"Context","class":{"type":"@Class","fixedId":true,"id":"classes/152","name":"Null"},"kind":"Null","fixedId":true,"id":"objects/null","valueAsString":"null"}},"declarationTokenPos":7427,"scopeStartTokenPos":7427,"scopeEndTokenPos":8924},{"type":"BoundVariable","name":"args","value":{"type":"@Instance","_vmType":"Array","class":{"type":"@Class","fixedId":true,"id":"classes/78","name":"_List","_vmName":"_List@0150898"},"kind":"List","id":"objects/38","length":0},"declarationTokenPos":7457,"scopeStartTokenPos":7427,"scopeEndTokenPos":8924},{"type":"BoundVariable","name":"message","value":{"type":"@Instance","_vmType":"null","class":{"type":"@Class","fixedId":true,"id":"classes/152","name":"Null"},"kind":"Null","fixedId":true,"id":"objects/null","valueAsString":"null"},"declarationTokenPos":7475,"scopeStartTokenPos":7427,"scopeEndTokenPos":8924},{"type":"BoundVariable","name":"_","value":{"type":"@Instance","_vmType":"null","class":{"type":"@Class","fixedId":true,"id":"classes/152","name":"Null"},"kind":"Null","fixedId":true,"id":"objects/null","valueAsString":"null"},"declarationTokenPos":8604,"scopeStartTokenPos":8604,"scopeEndTokenPos":8924}],"index":2},{"type":"Frame","kind":"Regular","location":{"type":"SourceLocation","script":{"type":"@Script","fixedId":true,"id":"libraries/@1026248/scripts/dart%3Aisolate-patch%2Fisolate_patch.dart/0","uri":"dart:isolate-patch/isolate_patch.dart","_kind":"kernel"},"tokenPos":4911},"function":{"type":"@Function","fixedId":true,"id":"classes/67/functions/_handleMessage%401026248","name":"_handleMessage","_vmName":"_handleMessage@1026248","owner":{"type":"@Class","fixedId":true,"id":"classes/67","name":"_RawReceivePortImpl","_vmName":"_RawReceivePortImpl@1026248"},"_kind":"RegularFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"code":{"type":"@Code","fixedId":true,"id":"code/81b72551f-111aa2ec0","name":"[Unoptimized] _RawReceivePortImpl._handleMessage","_vmName":"[Unoptimized] _handleMessage","kind":"Dart","_optimized":false,"_intrinsic":false,"_native":false},"vars":[{"type":"BoundVariable","name":"handler","value":{"type":"@Instance","_vmType":"Closure","class":{"type":"@Class","fixedId":true,"id":"classes/49","name":"_Closure","_vmName":"_Closure@0150898"},"kind":"Closure","id":"objects/39","closureFunction":{"type":"@Function","fixedId":true,"id":"libraries/@1026248/closures/9","name":"<anonymous closure>","owner":{"type":"@Function","fixedId":true,"id":"libraries/@1026248/functions/_startIsolate%401026248","name":"_startIsolate","_vmName":"_startIsolate@1026248","owner":{"type":"@Library","fixedId":true,"id":"libraries/@1026248","name":"dart.isolate","uri":"dart:isolate"},"_kind":"RegularFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"_kind":"ClosureFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"closureContext":{"type":"@Context","id":"objects/40","length":5}},"declarationTokenPos":4672,"scopeStartTokenPos":4672,"scopeEndTokenPos":4961},{"type":"BoundVariable","name":"message","value":{"type":"@Instance","_vmType":"null","class":{"type":"@Class","fixedId":true,"id":"classes/152","name":"Null"},"kind":"Null","fixedId":true,"id":"objects/null","valueAsString":"null"},"declarationTokenPos":4685,"scopeStartTokenPos":4685,"scopeEndTokenPos":4961}],"index":3},{"type":"Frame","kind":"AsyncSuspensionMarker","marker":"AsynchronousSuspension","index":4},{"type":"Frame","kind":"AsyncCausal","location":{"type":"SourceLocation","script":{"type":"@Script","fixedId":true,"id":"libraries/@19027873/scripts/file%3A%2F%2F%2FUsers%2Fdanny%2FDesktop%2Fdart_sample%2Fbin%2Fmain.dart/1745501d02d","uri":"file:///Users/danny/Desktop/dart_sample/bin/main.dart","_kind":"kernel"},"tokenPos":-1},"function":{"type":"@Function","fixedId":true,"id":"libraries/@19027873/implicit_closures/0","name":"main","owner":{"type":"@Function","fixedId":true,"id":"libraries/@19027873/functions/main","name":"main","owner":{"type":"@Library","fixedId":true,"id":"libraries/@19027873","name":"","uri":"file:///Users/danny/Desktop/dart_sample/bin/main.dart"},"_kind":"RegularFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"_kind":"ImplicitClosureFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"code":{"type":"@Code","fixedId":true,"id":"code/81b7257b9-111aa4120","name":"[Unoptimized] main","kind":"Dart","_optimized":false,"_intrinsic":false,"_native":false},"index":5},{"type":"Frame","kind":"AsyncCausal","location":{"type":"SourceLocation","script":{"type":"@Script","fixedId":true,"id":"libraries/@0150898/scripts/dart%3Acore-patch%2Ffunction.dart/0","uri":"dart:core-patch/function.dart","_kind":"kernel"},"tokenPos":-1},"function":{"type":"@Function","fixedId":true,"id":"classes/49/dispatchers/2","name":"call","_vmName":"dyn:call","owner":{"type":"@Class","fixedId":true,"id":"classes/49","name":"_Closure","_vmName":"_Closure@0150898"},"_kind":"InvokeFieldDispatcher","static":false,"const":false,"_intrinsic":false,"_native":false},"code":{"type":"@Code","fixedId":true,"id":"code/81b725565-111aa2f80","name":"[Unoptimized] _Closure.call","_vmName":"[Unoptimized] call","kind":"Dart","_optimized":false,"_intrinsic":false,"_native":false},"index":6},{"type":"Frame","kind":"AsyncCausal","location":{"type":"SourceLocation","script":{"type":"@Script","fixedId":true,"id":"libraries/@1026248/scripts/dart%3Aisolate-patch%2Fisolate_patch.dart/0","uri":"dart:isolate-patch/isolate_patch.dart","_kind":"kernel"},"tokenPos":8821},"function":{"type":"@Function","fixedId":true,"id":"libraries/@1026248/closures/9","name":"<anonymous closure>","owner":{"type":"@Function","fixedId":true,"id":"libraries/@1026248/functions/_startIsolate%401026248","name":"_startIsolate","_vmName":"_startIsolate@1026248","owner":{"type":"@Library","fixedId":true,"id":"libraries/@1026248","name":"dart.isolate","uri":"dart:isolate"},"_kind":"RegularFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"_kind":"ClosureFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"code":{"type":"@Code","fixedId":true,"id":"code/81b7255c9-111aa32d0","name":"[Unoptimized] _startIsolate.<anonymous closure>","_vmName":"[Unoptimized] <anonymous closure>","kind":"Dart","_optimized":false,"_intrinsic":false,"_native":false},"index":7},{"type":"Frame","kind":"AsyncCausal","location":{"type":"SourceLocation","script":{"type":"@Script","fixedId":true,"id":"libraries/@0150898/scripts/dart%3Acore-patch%2Ffunction.dart/0","uri":"dart:core-patch/function.dart","_kind":"kernel"},"tokenPos":-1},"function":{"type":"@Function","fixedId":true,"id":"classes/49/dispatchers/2","name":"call","_vmName":"dyn:call","owner":{"type":"@Class","fixedId":true,"id":"classes/49","name":"_Closure","_vmName":"_Closure@0150898"},"_kind":"InvokeFieldDispatcher","static":false,"const":false,"_intrinsic":false,"_native":false},"code":{"type":"@Code","fixedId":true,"id":"code/81b725565-111aa2f80","name":"[Unoptimized] _Closure.call","_vmName":"[Unoptimized] call","kind":"Dart","_optimized":false,"_intrinsic":false,"_native":false},"index":8},{"type":"Frame","kind":"AsyncCausal","location":{"type":"SourceLocation","script":{"type":"@Script","fixedId":true,"id":"libraries/@1026248/scripts/dart%3Aisolate-patch%2Fisolate_patch.dart/0","uri":"dart:isolate-patch/isolate_patch.dart","_kind":"kernel"},"tokenPos":4911},"function":{"type":"@Function","fixedId":true,"id":"classes/67/functions/_handleMessage%401026248","name":"_handleMessage","_vmName":"_handleMessage@1026248","owner":{"type":"@Class","fixedId":true,"id":"classes/67","name":"_RawReceivePortImpl","_vmName":"_RawReceivePortImpl@1026248"},"_kind":"RegularFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"code":{"type":"@Code","fixedId":true,"id":"code/81b72551f-111aa2ec0","name":"[Unoptimized] _RawReceivePortImpl._handleMessage","_vmName":"[Unoptimized] _handleMessage","kind":"Dart","_optimized":false,"_intrinsic":false,"_native":false},"index":9}],"messages":[]},"id":"45"}
[6:27:02 PM] [VmService] ==> {"id":"46","jsonrpc":"2.0","method":"getObject","params":{"isolateId":"isolates/818684413507763","objectId":"libraries/@15069316/scripts/dart%3Aio%2Fdirectory.dart/0"}}
[6:27:02 PM] [VmService] <== {"jsonrpc":"2.0","result":{"type":"Script","class":{"type":"@Class","fixedId":true,"id":"classes/12","name":"Script"},"size":96,"fixedId":true,"id":"libraries/@15069316/scripts/dart%3Aio%2Fdirectory.dart/0","uri":"dart:io/directory.dart","_kind":"kernel","_loadTime":0,"library":{"type":"@Library","fixedId":true,"id":"libraries/@15069316","name":"dart.io","uri":"dart:io"},"lineOffset":0,"columnOffset":0,"tokenPosTable":[[109,4038,1],[114,4171,3,4182,14,4186,18],[125,4496,4],[126,4523,3,4531,11,4540,20,4548,28],[127,4579,24,4589,34,4603,48],[128,4616,5,4620,9,4630,19],[129,4647,7,4658,18,4669,29],[131,4686,5,4693,12,4703,22,4719,38],[132,4728,3],[134,4734,4],[135,4761,3,4769,11,4790,32,4801,43],[137,4852,5,4863,16,4886,39],[138,4895,3],[145,5035,3,5043,11,5060,28,5065,33,5073,41,5077,45,5087,55,5091,59,5104,72],[151,5201,3,5222,24,5230,32],[152,5255,24,5265,34,5279,48],[153,5292,5,5296,9,5306,19],[154,5323,7,5341,25],[156,5360,5,5367,12,5377,22],[157,5402,3],[166,5668,3,5676,11,5679,14],[186,6462,3,6478,19,6485,26,6486,27],[187,6517,24,6527,34,6541,48],[188,6554,5,6558,9,6568,19],[189,6596,18,6606,28],[190,6618,7],[192,6636,5,6646,15,6666,35],[193,6675,3],[206,7135,3,7153,21,7159,27,7166,34,7177,45,7184,52],[217,7539,3,7544,8,7554,18,7561,25,7572,36,7579,43],[227,7867,3,7888,24,7899,35],[228,7924,24,7934,34,7948,48],[229,7961,5,7965,9,7975,19],[230,7992,7,8010,25],[232,8032,5,8039,12,8049,22],[233,8077,3],[244,8430,3,8448,21,8458,31,8468,41,8476,49],[254,8794,3,8804,13,8818,27,8828,37,8836,45],[256,8841,3,8856,18,8876,38,8878,40],[258,8883,3,8890,10,8914,34,8916,36],[268,9266,3,9284,21,9290,27,9298,35,9306,43],[278,9609,3,9619,13,9629,23,9637,31,9645,39],[287,9898,3,9912,17,9920,25],[309,10764,3,10789,28,10793,32],[310,10807,13,10818,24,10830,36,10843,49,10849,55],[332,11686,3,11709,26,11717,34],[333,11731,13,11742,24,11754,36,11767,49,11773,55],[338,11856,3,11863,10,11871,18,11873,20],[339,11875,1]]},"id":"46"}

The last line is the response to calling getObject with the script ID, and it's missing the source still. I don't know if it's specific to the nightlies, but it was causing my integration tests to fail (which use Dev builds) too (I haven't re-enabled them yet though).

@bkonyi
Copy link
Contributor

bkonyi commented Sep 3, 2020

That's really strange... Can I trouble you to share your script and how you run it?

@DanTup
Copy link
Collaborator Author

DanTup commented Sep 3, 2020

Sure! I'm using VS Code, with two files:

bin/main.dart

main() {
  print('test'); // Breakpoint here
}

.vscode/settings.json

{
	"dart.sdkPath": "/Users/danny/Dev/Dart SDKs/nightly-2020-09-03", // Path to SDK here
	"dart.debugSdkLibraries": true,
	"dart.debugExternalLibraries": true,
	"dart.vmServiceLogFile": "logs/vmservice.txt",
}
  • Open the folder parent of those folders in VS Code (so the .vscode and bin folders are both in the workspace)
  • add a breakpoint on the marked line in bin/main.dart
  • Press F5 to run and wait to hit the breakpoint
  • Press F11 to step-into

You'd normally see source code, but you'll now see <source not available>. The VM service traffic will be logged into the logs folder so you can examine it.

@bkonyi
Copy link
Contributor

bkonyi commented Sep 8, 2020

Confirmed I can reproduce using VSCode and a local SDK build. I wonder if there's maybe two copies of these scripts reported and maybe that's what's causing the issue... I'll keep digging.

@DanTup
Copy link
Collaborator Author

DanTup commented Sep 8, 2020

Great! Let me know if you need me to test anything, or if you think I might be doing anything weird in VS Code to cause this. Thanks!

@bkonyi
Copy link
Contributor

bkonyi commented Sep 9, 2020

Fix up for review.

@DanTup
Copy link
Collaborator Author

DanTup commented Sep 14, 2020

Great, thanks!

@DanTup
Copy link
Collaborator Author

DanTup commented Oct 5, 2020

@bkonyi it seems like this still isn't working in the v2.10 release build:

{
	"jsonrpc": "2.0",
	"result": {
		"type": "Script",
		"class": {
			"type": "@Class",
			"fixedId": true,
			"id": "classes\/12",
			"name": "Script"
		},
		"size": 96,
		"fixedId": true,
		"id": "libraries\/@0150898\/scripts\/dart%3Acore%2Fprint.dart\/0",
		"uri": "dart:core\/print.dart",
		"_kind": "kernel",
		"_loadTime": 0,
		"library": {
			"type": "@Library",
			"fixedId": true,
			"id": "libraries\/@0150898",
			"name": "dart.core",
			"uri": "dart:core"
		},
		"lineOffset": 0,
		"columnOffset": 0,
		"tokenPosTable": [[8,302,1,307,6,312,11,321,20],[9,340,10,345,15,347,17,354,24],[10,372,7,379,14,381,16],[11,396,3,400,7,407,14],[12,422,5,437,20],[14,459,5,465,11,466,12],[16,477,1]]
	},
	"id": "97"
}

I created a script that called print() and stepped into it with the debugger, and that's the result from the getObject call.

DanTup added a commit to Dart-Code/Dart-Code that referenced this issue Oct 5, 2020
@bkonyi
Copy link
Contributor

bkonyi commented Oct 5, 2020

It looks like this just missed the 2.10 branch (landed 26 days ago). 19875e9 landed 25 days ago :-(

@DanTup
Copy link
Collaborator Author

DanTup commented Oct 5, 2020

Oh, I see it. I saw some v2.10.0-dev tags on that change and assumed it was in. My bad, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

3 participants