Skip to content

Proposal: Add new reason finished or stepOut and optional field returnValue to Stopped Event #458

@theIDinside

Description

@theIDinside

As a maintainer of a debug adapter, I've been asked a few times about being able to display return values somehow, and even though it's doable with some minor hacking about (actually implemented sort of like it's described here, thus being non-standard compliant), it would be nice if it got standardized in the protocol.

Since we have stepOut request, which explicitly "finishes" the current function (in GDB lingo), a new reason value should be added to reflect that this has happened, instead of just reporting step. Due to this new reason, an optional field of type Variable should also be added to the StoppedEvent, where a structured representation of the return value is returned.

An explicit stepOut reason I think is to prefer, than just having it remain step and then have an optional value or something like that on StoppedEvent because it doesn't signal as clearly intention. Especially since step stops come in so many forms (next line, next instruction, next statement, etc).

Also, adding an additional stepOut reason, means that legacy adapters can continue signalling step if they so choose if they are unwilling or don't want to support the feature of displaying return values after a stepOut request.

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions