Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If getStackTraceRequest returns an empty stack, the Resume button does not work #73090

Closed
DanTup opened this issue Apr 30, 2019 · 5 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Milestone

Comments

@DanTup
Copy link
Contributor

DanTup commented Apr 30, 2019

If a debug adapter can't provide any frames and returns an empty array, for ex.:

protected stackTraceRequest(response: DebugProtocol.StackTraceResponse, args: DebugProtocol.StackTraceArguments): void {
	response.body = {
		stackFrames: [],
		totalFrames: 0,
	};
	this.sendResponse(response);
}

The Continue button no longer functions - it does not send a continueRequest. The same thing happens if you send an error response. As a workaround (since I have a debugger that can't provide a stack trace yet) I've had to provide a dummy stack frame in order for resume to work (sure, a debugger that can only pause and resume is not terribly useful, but this seems like strange behaviour from VS Code).

	response.body = {
		stackFrames: args.startFrame === 0 ? [
			{
				column: 0,
				id: -1,
				line: 0,
				name: "missing",
			},
		] : [],
		totalFrames: 0,
	};
@isidorn
Copy link
Contributor

isidorn commented Apr 30, 2019

If you would like this fixed can you please create a fork of the mock debug with this behavior so I reproduce this issue on my machine. Thank you.

@isidorn isidorn added debug Debug viewlet, configurations, breakpoints, adapter issues info-needed Issue requires more information from poster labels Apr 30, 2019
DanTup added a commit to DanTup/vscode-repro-73090 that referenced this issue May 2, 2019
@DanTup
Copy link
Contributor Author

DanTup commented May 2, 2019

@isidorn you just need to paste the sample above over stackTraceRequest. I've pushed it here, as well as added logging to make it clear:

https://github.com/DanTup/vscode-repro-73090

The specific change looks like this:

DanTup/vscode-repro-73090@a0a0572

All it does is logs when it stops (on entry), when VS Code asks for a stack trace, and when it gets a continue request, and also returns an empty stack trace.

Run the extension, open a .md file and run it with mock debug. It'll print:

Stopped on entry!
Sending empty call stack!

Now click the Continue button and observe that it never prints "Continue was called!".

Let me know if you ahve any issues reproducing with this.

@isidorn isidorn removed the info-needed Issue requires more information from poster label May 7, 2019
@isidorn isidorn added this to the May 2019 milestone May 7, 2019
@isidorn isidorn added the bug Issue identified by VS Code Team member as probable bug label May 28, 2019
@isidorn
Copy link
Contributor

isidorn commented May 28, 2019

Thanks for the nice repro steps.
I have pushed a fix, you can try it out in tomorrow's vscode insiders and let us know if the issue is fixed for you.

@DanTup
Copy link
Contributor Author

DanTup commented May 29, 2019

Fix looks good, thanks! :-)

@isidorn
Copy link
Contributor

isidorn commented May 29, 2019

Thanks, adding verified label.

@isidorn isidorn added the verified Verification succeeded label May 29, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

2 participants