Allow continuing from assertStoppedLocation

Open
#174 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
devtools, testing

Research direction

Start with the assertStoppedLocation entry point and the continueRequest call described in the issue, tracing how the thread ID is obtained and whether related test helpers cover continuation. Done means a test can assert the exception stop, resume execution, and then verify the expected stderr output.

Written by the indexing model from the issue text.

Description

feature-request

I'm struggling to find a way to assert that the debugger stops on an exception and writes to stderr when continued. Here's what I want to write:

await Promise.all([
	dc.configurationSequence(),
	dc.launch(config),
	dc.assertOutput("stderr", "Test failed. See exception logs above."),
	dc.assertStoppedLocation("exception", {
		line: positionOf("// EXCEPTION").line,
		path: flutterTestBrokenFile.fsPath,
	}),
]);

The problem is, the stderr is only written after the user hits continue. I thought I just chain a .then((_) => dc.continueRequest(...) request onto the end of the the assertStoppedLocation but it needs a threadId which is used inside assertStoppedLocation but not exposed in any way.

Is it possible to add an option to allow assertStoppedLocation to resume (or exposed the thread ID, but that may be tricky since it's returning a StackTrace response which doesn't contain it).

Dominant language
TypeScript
Stars
306
Forks
90
Avg merge
8h 36m
Merged PRs (30d)
3

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vscode-debugadapter-node

All issues in microsoft/vscode-debugadapter-node

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.