当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript DebugClient.stepOutRequest方法代码示例

本文整理汇总了TypeScript中vscode-debugadapter-testsupport.DebugClient.stepOutRequest方法的典型用法代码示例。如果您正苦于以下问题:TypeScript DebugClient.stepOutRequest方法的具体用法?TypeScript DebugClient.stepOutRequest怎么用?TypeScript DebugClient.stepOutRequest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vscode-debugadapter-testsupport.DebugClient的用法示例。


在下文中一共展示了DebugClient.stepOutRequest方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: it

	it('should inspect console evaluation results after stepping', async function() {

		let sourcePath = path.join(TESTDATA_PATH, 'web/main.js');
		await util.setBreakpoints(dc, sourcePath, [ 25 ]);

		util.evaluate(dc, 'factorial(3)');
		let stoppedEvent = await util.receiveStoppedEvent(dc);
		let stackTrace = await dc.stackTraceRequest({ threadId: stoppedEvent.body.threadId! });

		let evalResult = await dc.evaluateRequest({ expression: 'obj', context: 'repl',
			frameId: stackTrace.body.stackFrames[0].id });

		dc.stepOutRequest({ threadId: stoppedEvent.body.threadId! });
		await util.receiveStoppedEvent(dc);
		dc.stepOutRequest({ threadId: stoppedEvent.body.threadId! });
		await util.receiveStoppedEvent(dc);

		let inspectResult = await dc.variablesRequest({ 
			variablesReference: evalResult.body.variablesReference
		});
		assert.equal(util.findVariable(inspectResult.body.variables, 'x').value, '17');
	});
开发者ID:hbenl,项目名称:vscode-firefox-debug,代码行数:22,代码来源:testEvaluate.ts

示例2: it

	it('should inspect return values on stepping out', async function() {

		let sourcePath = path.join(TESTDATA_PATH, 'web/main.js');
		await util.setBreakpoints(dc, sourcePath, [ 71 ]);

		util.evaluate(dc, 'doEval(17)');
		let stoppedEvent = await util.receiveStoppedEvent(dc);
		let threadId = stoppedEvent.body.threadId!;

		await dc.stepOutRequest({ threadId });
		await util.receiveStoppedEvent(dc);
		let stackTrace = await dc.stackTraceRequest({ threadId: stoppedEvent.body.threadId! });
		let scopes = await dc.scopesRequest({ frameId: stackTrace.body.stackFrames[0].id });
		let variables = await dc.variablesRequest({ variablesReference: scopes.body.scopes[0].variablesReference });
		assert.equal(util.findVariable(variables.body.variables, 'Return value').value, 17);
	});
开发者ID:hbenl,项目名称:vscode-firefox-debug,代码行数:16,代码来源:testInspectVariables.ts

示例3: function

	it.skip('should inspect return values on stepping out of recursive functions', async function() {

		let sourcePath = path.join(TESTDATA_PATH, 'web/main.js');
		await util.setBreakpoints(dc, sourcePath, [ 25 ]);

		util.evaluate(dc, 'factorial(4)');
		let stoppedEvent = await util.receiveStoppedEvent(dc);
		let threadId = stoppedEvent.body.threadId!;

		for (let i = 0; i < 4; i++) {
			await dc.stepOutRequest({ threadId });
			await util.receiveStoppedEvent(dc);
			let stackTrace = await dc.stackTraceRequest({ threadId: stoppedEvent.body.threadId! });
			let scopes = await dc.scopesRequest({ frameId: stackTrace.body.stackFrames[0].id });
			let variables = await dc.variablesRequest({ variablesReference: scopes.body.scopes[0].variablesReference });
			assert.equal(util.findVariable(variables.body.variables, 'Return value').value, factorial(i + 1));
		}
	});
开发者ID:hbenl,项目名称:vscode-firefox-debug,代码行数:18,代码来源:testInspectVariables.ts

示例4: it

	it('should step out', async function() {

		let sourcePath = path.join(TESTDATA_PATH, 'web/main.js');
		await util.setBreakpoints(dc, sourcePath, [ 3 ]);

		util.evaluate(dc, 'vars()');
		let stoppedEvent = await util.receiveStoppedEvent(dc);
		let threadId = stoppedEvent.body.threadId!;

		let stackTrace = await dc.stackTraceRequest({ threadId });
		assert.equal(stackTrace.body.stackFrames[0].source!.path, sourcePath);
		assert.equal(stackTrace.body.stackFrames[0].line, 3);

		dc.stepOutRequest({ threadId });
		await util.receiveStoppedEvent(dc);

		stackTrace = await dc.stackTraceRequest({ threadId });
		assert.equal(stackTrace.body.stackFrames[0].source!.path, sourcePath);
		assert.equal(stackTrace.body.stackFrames[0].line, 21);
	});
开发者ID:hbenl,项目名称:vscode-firefox-debug,代码行数:20,代码来源:testStepThrough.ts

示例5:

		await util.runCommandAndReceiveStoppedEvent(dc, () => dc.stepOutRequest({ threadId }));
开发者ID:hbenl,项目名称:vscode-firefox-debug,代码行数:1,代码来源:sourceMapUtil.ts


注:本文中的vscode-debugadapter-testsupport.DebugClient.stepOutRequest方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。