This commit is contained in:
Unknown 2018-05-21 14:33:27 -07:00
Родитель a24e5e048e
Коммит 158a702d47
3 изменённых файлов: 9 добавлений и 3 удалений

Просмотреть файл

@ -13,7 +13,7 @@ import * as vscode from 'vscode';
import AbstractProvider from './abstractProvider';
import { DebuggerEventsProtocol } from '../coreclr-debug/debuggerEventsProtocol';
import { OmniSharpServer } from '../omnisharp/server';
import { TestExecutionCountReport, ReportDotnetTestResults, DotnetTestRunStart, DotnetTestMessage, DotnetTestRunFailure, DotnetTestsInClassRunStart, DebuggerWarning, DebugStart, DebugComplete } from '../omnisharp/loggingEvents';
import { TestExecutionCountReport, ReportDotnetTestResults, DotnetTestRunStart, DotnetTestMessage, DotnetTestRunFailure, DotnetTestsInClassRunStart, DebuggerWarning, DebugStart, DebugComplete, DotnetTestDebugStart, DotnetTestsInClassDebugStart } from '../omnisharp/loggingEvents';
import { EventStream } from '../EventStream';
import LaunchConfiguration from './launchConfiguration';
import Disposable from '../Disposable';
@ -323,6 +323,8 @@ export default class TestManager extends AbstractProvider {
// We support to styles of 'dotnet test' for debugging: The legacy 'project.json' testing, and the newer csproj support
// using VS Test. These require a different level of communication.
this._eventStream.post(new DotnetTestDebugStart(testMethod));
let { debugType, debugEventListener, targetFrameworkVersion } = await this._recordDebugAndGetDebugValues(fileName, testFrameworkName);
return this._getLaunchConfiguration(debugType, fileName, testMethod, testFrameworkName, targetFrameworkVersion, debugEventListener)
@ -340,6 +342,8 @@ export default class TestManager extends AbstractProvider {
private async _debugDotnetTestsInClass(methodsToRun: string[], fileName: string, testFrameworkName: string) {
this._eventStream.post(new DotnetTestsInClassDebugStart());
let { debugType, debugEventListener, targetFrameworkVersion } = await this._recordDebugAndGetDebugValues(fileName, testFrameworkName);
return await this._getLaunchConfigurationForClass(debugType, fileName, methodsToRun, testFrameworkName, targetFrameworkVersion, debugEventListener)
@ -433,7 +437,7 @@ class DebugEventListener {
event = DebuggerEventsProtocol.decodePacket(buffer);
}
catch (e) {
this._eventStream.post(new DebuggerWarning("'Invalid' event received from debugger"));
this._eventStream.post(new DebuggerWarning("Invalid event received from debugger"));
return;
}

Просмотреть файл

@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import { BaseChannelObserver } from "./BaseChannelObserver";
import { BaseEvent, DotnetTestRunStart, DotnetTestRunFailure, DotnetTestsInClassRunStart, DotnetTestDebugStart } from "../omnisharp/loggingEvents";
import { BaseEvent, DotnetTestRunStart, DotnetTestRunFailure, DotnetTestsInClassRunStart, DotnetTestDebugStart, DotnetTestsInClassDebugStart } from "../omnisharp/loggingEvents";
export default class DotnetTestChannelObserver extends BaseChannelObserver {
public post = (event: BaseEvent) => {
@ -13,6 +13,7 @@ export default class DotnetTestChannelObserver extends BaseChannelObserver {
case DotnetTestRunFailure.name:
case DotnetTestsInClassRunStart.name:
case DotnetTestDebugStart.name:
case DotnetTestsInClassDebugStart.name:
this.showChannel();
break;
}

Просмотреть файл

@ -168,4 +168,5 @@ export class OmnisharpServerOnStart implements BaseEvent { }
export class LatestBuildDownloadStart implements BaseEvent { }
export class OmnisharpRestart implements BaseEvent { }
export class DotnetTestsInClassRunStart implements BaseEvent { }
export class DotnetTestsInClassDebugStart implements BaseEvent { }
export class DebugComplete implements BaseEvent { }