microsoft / vscode-debugadapter-node

Debug adapter protocol and implementation for VS Code.
Other
273 stars 79 forks source link

Debug protocol: Add "externalCode" option to StackFrameFormat #117

Closed andrewcrawley closed 7 years ago

andrewcrawley commented 7 years ago

The "Just My Code" feature in VS causes stack frames containing non-user code to be collapsed into a single "[External Code]" label. If users want to see the hidden frames without disabling JMC entirely, they can enable a "Show external code" stack formatting option. We need to add a member to StackFrameFormat to represent this option.

Proposal:

export interface StackFrameFormat extends ValueFormat {
    // ...

    /** Displays stack frames containing external code. */
    externalCode?: boolean;

    // ...
}

Namedrops: @weinand @gregg-miskelly @richardstanton @pieandcakes

weinand commented 7 years ago

Different debug adapters might collapse frames for a different reason than "External Code", e.g. "Uninteresting Code".

Could we use a name that describes more the purpose in the UI than the reason, e.g. "hideNoFrames" or "allFames" or "expandAllFrames"?

VS Code could offer an action "Show collapsed frames".

gregg-miskelly commented 7 years ago

Sounds reasonable to me.

andrewcrawley commented 7 years ago

Yeah, that makes sense. How about something like:

export interface StackFrameFormat extends ValueFormat {
    // ...

    /** Includes all stack frames, including those the debug adapter might otherwise hide. */
    includeAll?: boolean;

    // ...
}