You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2022/01/30 00:54:14 UTC

[GitHub] [daffodil-vscode] arosien edited a comment on issue #66: Multi-file Breakpoint

arosien edited a comment on issue #66:
URL: https://github.com/apache/daffodil-vscode/issues/66#issuecomment-1025018144


   As [mentioned above](https://github.com/apache/daffodil-vscode/issues/66#issuecomment-1021441014), the path to the location was incorrectly set to be the starting schema file, not the actual location the debugger is currently processing. I have a fix for that and will push a PR. 
   
   A related issue is that one way a user could navigate to an imported schema would be via the `StepIn` command, where the definition of the current entity was declared elsewhere. However `StepIn` is currently not implemented; see #5.
   
   However, these fixes won't apply for schemas that are not directly available in the filesystem, i.e., schemas in included jar files. To handle that scenario I have an additional patch that changes the internal representation of a schema location from a (file) path to a URI, as schemas within an included jar file have URIs that begin `jar:file:`. However, to actually display the schema within the editor, since the content is within some jar file, we need to send [`LoadedSource`](https://microsoft.github.io/debug-adapter-protocol/specification#Events_LoadedSource) DAP events from our backend to VS Code when we notice any referenced schema outside of the initial schema. We can do this eagerly (scan the XML, etc.) or lazily (as the schema is processed we notify when a new schema is encountered. The editor then will request the source content, and the backend can send it (since we can access the data of the jar file on the classpath), and the editor will display the (read-only) content
 . Implementation-wise, we need to re-enable the `supportsLoadedSourcesRequest` initialization parameter that was disabled in #25, decide the schema source discovery strategy, and handle the appropriate events and requests.
   
   For [1.0.0](https://github.com/apache/daffodil-vscode/milestone/1) we need to decide whether navigation into classpath-hosted jar files is necessary, or not. (Files on the normal file system should have working breakpoints once the small fix is pushed.)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org