microsoft / VSDebugAdapterHost

Visual Studio Debug Adapter Host
MIT License
77 stars 20 forks source link

SourceRequest not made when the source name contains a '.' #15

Open ben-clayton opened 5 years ago

ben-clayton commented 5 years ago

According to the specification of Source.sourceReference a SourceRequest must be made if the source has a sourceReference > 0:

  /**
   * If sourceReference > 0 the contents of the source must be retrieved through the SourceRequest (even if a path is specified). A sourceReference is only valid for a session, so it must not be used to persist a source. The value should be less than or equal to 2147483647 (2^31 - 1).
   */
  sourceReference?: number;

However, if source.sourceReference > 0 and the source.name contains a ., no SourceRequest is made, and you are presented with the Find File dialog. If the dot is replaced with an underscore, the IDE makes the SourceRequest and the file is shown.

This is especially troublesome as VSCode (and probably VS) will use the file extension to know how to syntax highlight the source.