-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Comments
@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. |
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. |
Was this a Flutter application? Is this still an issue? I'm unable to reproduce with the standalone VM. |
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
The last line is the response to calling |
That's really strange... Can I trouble you to share your script and how you run it? |
Sure! I'm using VS Code, with two files: bin/main.dartmain() {
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",
}
You'd normally see source code, but you'll now see |
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. |
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! |
Fix up for review. |
Great, thanks! |
@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 |
It looks like this just missed the 2.10 branch (landed 26 days ago). 19875e9 landed 25 days ago :-( |
Oh, I see it. I saw some v2.10.0-dev tags on that change and assumed it was in. My bad, thanks! |
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 fordart:core/print.dart
.Left is v2.9, right is v2.10.0-56.0.dev.
We use this in VS Code when the user steps into SDK libraries (otherwise the user will just see
<source not available>
).cc @bkonyi
The text was updated successfully, but these errors were encountered: