-
Notifications
You must be signed in to change notification settings - Fork 30.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
After installation 1.28.1, my debug extension does not show the entire call stack. #61088
Comments
@killerall thanks for reporting this issue. Does your extension @killerall For the future since you are an extension author it would be great if you could be using Insider - that way we would be able to find issue like this sooner. fyi @weinand |
@isidorn thanks for the answer. I just implemented and tested the totalFrames in response. There was no difference. I usually use the Insider, but I'm not programming in ADPVL so often. I'll ask some user keys to use the Insider as well. Thank you. |
Thanks. Does your extension If you F1 > developer tools > are there some errors in the console? |
No. In the latest version of Uri.ts, it throws exceptions if it can not find the file. The getCallStackImpl method of the debugModel.ts class stops adding the elements in the stack if any exceptions are thrown.
|
@killerall great find! |
The new URI.parse behaviour in VS Code 1.28.1 results in an exception if the "path" attribute of a "Source" is not absolute. I've added a workaround to restore the previous behaviour. However, returning relative paths in a "Source" object and having a "sourceReference" with value 0 at the same time does not make any sense. @killerall here is the explanation:
So all but the first "Source" objects in the json response from above are incorrect because they have relative paths and a "sourceReference" of 0. |
@weinand Thanks for the answer. function1 - Source1 Let's assume that the Source2 source file is not in the workspace. Should I return a SourceResponse with blank content? If this is the correct behavior, I will change my extension. |
This is a correct source object because "path" is absolute: "source":{
"name":"test.tlpp",
"path":"c:\\vscode\\tlpp-unit-test\\test\\test.tlpp",
"sourceReference":0
}, This source object is incorrect because "path" is relative: "source":{
"name":"APLIB190.PRW",
"path":"APLIB190.PRW",
"sourceReference":0
},
The easiest fix is to make "path" absolute by adding the containing folder to the path. So something like this: "source":{
"name":"APLIB190.PRW",
"path":"c:\\vscode\\tlpp-unit-test\\test\\APLIB190.PRW",
"sourceReference":0
}, VS Code will load files in both cases. Use a "sourceReference" only if there is no local file behind a "source" object. In that case your DA can manufacture the contents and return it from the source request. |
@weinand Thank you very much for the quick reply. The problem is the source code APLIB190, for example, is not available in the workspace, and DA does not know it either (similar to a dynamic library that does not have the source code). If I could understand. I should send sourceReference (in APLIB090), and when DA receives the request, I return the content as: "source code is not available". This is correct? |
@killerall yes, your approach is basically correct. But please consider this: even if the source is not available in your workspace (or outside), there is probably a binary file (e.g. a dynamic library) somewhere in the filesystem. And this file has a path. In this case I recommend to return that path. VS Code will automatically show an error if it cannot show the contents of the file in an editor. |
Understood. |
@killerall it would be great if you could verify that your (unmodified) debug extension works as before in the latest Insiders. |
@weinand Thanks a lot. |
Great, I'll add a verified label. |
Issue Type: Bug
After installation 1.28.1, updated from version 1.27.2, my debug extension does not show the entire "call stack".
Previous behavior (1.27.2):
![image](https://user-images.githubusercontent.com/4764609/47049584-1d225180-d174-11e8-894c-caf089b2e96f.png)
The stack was fully displayed:
New behavior (1.28.1):
![image](https://user-images.githubusercontent.com/4764609/47049751-9cb02080-d174-11e8-87f3-51b75d12050c.png)
If the source code is not found in the folder (s) the stack item is not displayed:
My debug extension sends the following json response to the StackTrace request:
Has something changed that I need to implement in my extension?
PSC
I tested the insiders and behavior continues the same as 1.28.1.
VS Code version: Code 1.28.1 (3368db6, 2018-10-11T18:13:53.910Z)
OS version: Windows_NT x64 10.0.15063
System Info
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Extensions (10)
The text was updated successfully, but these errors were encountered: