You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Represent lables without normalisation in workbench #29985
start a debugging session using the Chrome or Firefox debug adapter (those are the ones I checked)
step into a remote source that can't be mapped to a local path by the debug adapter
have a look at the tooltip shown for the remote source - it will display e.g. http:\test.com\file.html instead of the correct http://test.com/file.html
When the debug adapter wants to send a Source object for a remote file to VS Code, it can do so by setting the path to the URL of the remote file and adding a sourceReference which can be used by VS Code to retrieve the file content from the debug adapter.
This is working fine, except that on Windows the URL is slightly garbled when it's presented to the user in the tooltip - VS Code seems to insist on interpreting the path property as a local file path (which is why / is replaced with \ on Windows), but in this case it's not.
I think VS Code should not modify the path property if the sourceReference property is set, because this signals that the Source object does not correspond to a local file but something else (a remote file or a script passed to eval(), for example).
changed the title [-]Debugger interprets URLs of remote sources as local paths [/-][+]Represent lables without normalisation in workbench[/+]on Jul 3, 2017
Isidor Nikolic (@isidorn) can you point me to the code where you set the label? I wonder if we should maybe be smarter when the resource is not a file resource.
Yeah we typically always call URI.fsPath and then show this in a label. fsPath will convert slashes to backslash. This needs some better story for how to represent non file resources in the UI. It is probably already wrong that we call dirname on these editor description labels.
Isidor Nikolic (@isidorn) you can pass over a label and description to use for editors so maybe it would be good for you to handle this better? The fsPath and dirname is really just a fallback when the caller of openEditor is not providing any better labels.
Activity
isidorn commentedon Jul 3, 2017
This is simply how worbkench is presetning files always
So we would need an option to not normalize labels in workbench -> feature request
fyi Benjamin Pasero (@bpasero)
[-]Debugger interprets URLs of remote sources as local paths [/-][+]Represent lables without normalisation in workbench[/+]bpasero commentedon Jul 3, 2017
Isidor Nikolic (@isidorn) can you point me to the code where you set the label? I wonder if we should maybe be smarter when the resource is not a file resource.
isidorn commentedon Jul 3, 2017
Benjamin Pasero (@bpasero) https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/debug/common/debugModel.ts#L383
bpasero commentedon Jul 3, 2017
Yeah we typically always call
URI.fsPathand then show this in a label.fsPathwill convert slashes to backslash. This needs some better story for how to represent non file resources in the UI. It is probably already wrong that we calldirnameon these editor description labels.Isidor Nikolic (@isidorn) you can pass over a label and description to use for editors so maybe it would be good for you to handle this better? The
fsPathanddirnameis really just a fallback when the caller of openEditor is not providing any better labels.hbenl commentedon Oct 15, 2017
I just noticed that this is fixed in VS Code 1.17.1
isidorn commentedon Oct 16, 2017
Holger Benl (@hbenl) thanks for checking. Yes we have been doing some remote file system work which probably touched on this