Skip to content

"Unable to open 'Unknown Source'" if StackFrame.source is missing #20622

Closed

Description

@Gama11

As I understand, StackFrame.source in the debug protocol is supposed to be optional (because there might not always be a source location available). However, starting with VSCode 1.9.0, a missing source causes the following error (after a pause request response, might happen elsewhere too):

(btw: same thing with a source that is present, but has no path)

At first glance, this makes it look like pausing didn't work. However, at a second glance, pausing and resuming still works fine, so it's mostly a cosmetic issue (that still might lead the user to think it's broken).

Here's what our debug adapter (Haxe Debug) sends:

This works fine (no error appears) in 1.8.1, which would make this a regression. The issue is still present in the latest Insider's build (1d17b45).

Other debug adapters seem to have the same issue, as suggested by this StackOverflow question regarding the same error message with ASP.NET.

Issue #4608 seems somewhat related to this.

Activity

  1. added
    bug
    debug
    on Feb 15, 2017
  2. isidorn commented on Feb 20, 2017

    @isidorn

    Jens Fischer (@Gama11) does the fix work for you? Namely vscode should simply not open the source if it is missing which would prevent the error.

  3. Gama11 commented on Feb 20, 2017

    @Gama11
    ContributorAuthor

    Isidor Nikolic (@isidorn) Yes, it works if our debug adapter sends a stackframe like the one in the screenshot of my original post (one without a source).

    Our debug adapter used to send messages like this, where source is present, but path is null - with this, I can still reproduce the error on Insider's:

    I just assumed that that was incorrect API usage / not supposed to work anyway - it always showed the path as null in the call stack rather than detecting it as Unknown Source:

    Even though in 1.8.1, this didn't error, but it actually opened a <null> file, which doesn't seem correct either:

  4. isidorn commented on Feb 20, 2017

    @isidorn

    Jens Fischer (@Gama11) thanks. Yes that is how it is supposed to work now. Adding verified label

  5. locked and limited conversation to collaborators on Nov 18, 2017
  6. added a commit that references this issue on Sep 6, 2026
    9141753
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugdebugverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions