upgrade to latest protocol
This commit is contained in:
Родитель
5713a5b877
Коммит
67193ee416
|
@ -1,201 +1,9 @@
|
|||
/tests/out/
|
||||
/extension/
|
||||
/upload/
|
||||
/bin/
|
||||
/node_modules/
|
||||
/packages/
|
||||
/obj/
|
||||
*.vsix
|
||||
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
build/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
|
||||
# Visual Studo 2015 cache/options directory
|
||||
.vs/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUNIT
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_i.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# JustCode is a .NET coding addin-in
|
||||
.JustCode
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# TODO: Comment the next line if you want to checkin your web deploy settings
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/packages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/packages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/packages/repositories.config
|
||||
|
||||
# Windows Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Windows Store app package directory
|
||||
AppPackages/
|
||||
|
||||
# Others
|
||||
*.[Cc]ache
|
||||
ClientBin/
|
||||
[Ss]tyle[Cc]op.*
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
node_modules/
|
||||
bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
mono-debug.userprefs
|
|
@ -35,7 +35,7 @@
|
|||
"gulp-vinyl-zip": "*",
|
||||
"mocha": "^2.3.4",
|
||||
"typescript": "^1.7.3",
|
||||
"vscode-debugprotocol": "^1.5.0"
|
||||
"vscode-debugprotocol": "~1.6.0-pre4"
|
||||
},
|
||||
"contributes": {
|
||||
"debuggers": [{
|
||||
|
|
|
@ -11,7 +11,6 @@ using System.Linq;
|
|||
using System.Net;
|
||||
using Mono.Debugger.Client;
|
||||
using Mono.Debugging.Client;
|
||||
using System.Collections.Concurrent;
|
||||
using Microsoft.CSharp.RuntimeBinder;
|
||||
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ namespace OpenDebug
|
|||
Task<DebugResult> Disconnect();
|
||||
|
||||
Task<DebugResult> SetBreakpoints(Source source, int[] lines);
|
||||
Task<DebugResult> SetFunctionBreakpoints();
|
||||
Task<DebugResult> SetExceptionBreakpoints(string[] filter);
|
||||
|
||||
Task<DebugResult> Continue(int threadId);
|
||||
|
@ -147,6 +148,9 @@ namespace OpenDebug
|
|||
}
|
||||
return new DebugResult(1012, "setBreakpoints: property 'source' is empty or misformed");
|
||||
|
||||
case "setFunctionBreakpoints":
|
||||
return SetFunctionBreakpoints().Result;
|
||||
|
||||
case "setExceptionBreakpoints":
|
||||
string[] filters = null;
|
||||
if (args.filters != null) {
|
||||
|
@ -206,6 +210,11 @@ namespace OpenDebug
|
|||
return Task.FromResult(new DebugResult());
|
||||
}
|
||||
|
||||
public virtual Task<DebugResult> SetFunctionBreakpoints()
|
||||
{
|
||||
return Task.FromResult(new DebugResult());
|
||||
}
|
||||
|
||||
public virtual Task<DebugResult> SetExceptionBreakpoints(string[] filter)
|
||||
{
|
||||
return Task.FromResult(new DebugResult());
|
||||
|
|
Двоичные данные
tests/data/simple/Program.exe.mdb
Двоичные данные
tests/data/simple/Program.exe.mdb
Двоичный файл не отображается.
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -7,6 +7,7 @@ var Path = require('path');
|
|||
var DebugClient_1 = require('./DebugClient');
|
||||
suite('Node Debug Adapter', function () {
|
||||
var PROJECT_ROOT = Path.join(__dirname, '../../');
|
||||
var DATA_ROOT = Path.join(PROJECT_ROOT, 'tests/data/');
|
||||
var DEBUG_ADAPTER = Path.join(PROJECT_ROOT, 'bin/Release/mono-debug.exe');
|
||||
var dc;
|
||||
setup(function (done) {
|
||||
|
@ -42,7 +43,7 @@ suite('Node Debug Adapter', function () {
|
|||
});
|
||||
suite('launch', function () {
|
||||
test('should run program to the end', function () {
|
||||
var PROGRAM = Path.join(PROJECT_ROOT, 'tests/data/simple/Program.exe');
|
||||
var PROGRAM = Path.join(DATA_ROOT, 'simple/Program.exe');
|
||||
return Promise.all([
|
||||
dc.configurationSequence(),
|
||||
dc.launch({ program: PROGRAM }),
|
||||
|
@ -50,7 +51,7 @@ suite('Node Debug Adapter', function () {
|
|||
]);
|
||||
});
|
||||
test('should stop on debugger statement', function () {
|
||||
var PROGRAM = Path.join(PROJECT_ROOT, 'tests/data/simple_break/Program.exe');
|
||||
var PROGRAM = Path.join(DATA_ROOT, 'simple_break/Program.exe');
|
||||
var DEBUGGER_LINE = 10;
|
||||
return Promise.all([
|
||||
dc.configurationSequence(),
|
||||
|
@ -60,15 +61,15 @@ suite('Node Debug Adapter', function () {
|
|||
});
|
||||
});
|
||||
suite('setBreakpoints', function () {
|
||||
var PROGRAM = Path.join(PROJECT_ROOT, 'tests/data/simple/Program.exe');
|
||||
var SOURCE = Path.join(PROJECT_ROOT, 'tests/data/simple/Program.cs');
|
||||
var PROGRAM = Path.join(DATA_ROOT, 'simple/Program.exe');
|
||||
var SOURCE = Path.join(DATA_ROOT, 'simple/Program.cs');
|
||||
var BREAKPOINT_LINE = 10;
|
||||
test('should stop on a breakpoint', function () {
|
||||
return dc.hitBreakpoint({ program: PROGRAM }, SOURCE, BREAKPOINT_LINE);
|
||||
return dc.hitBreakpoint({ program: PROGRAM }, { path: SOURCE, line: BREAKPOINT_LINE });
|
||||
});
|
||||
});
|
||||
suite('output events', function () {
|
||||
var PROGRAM = Path.join(PROJECT_ROOT, 'tests/data/output/Output.exe');
|
||||
var PROGRAM = Path.join(DATA_ROOT, 'output/Output.exe');
|
||||
test('stdout and stderr events should be complete and in correct order', function () {
|
||||
return Promise.all([
|
||||
dc.configurationSequence(),
|
||||
|
@ -79,4 +80,4 @@ suite('Node Debug Adapter', function () {
|
|||
});
|
||||
});
|
||||
});
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRhcHRlci50ZXN0LmpzIiwic291cmNlUm9vdCI6Ii4uL3NyYy8iLCJzb3VyY2VzIjpbImFkYXB0ZXIudGVzdC50cyJdLCJuYW1lcyI6W10sIm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BQ0osQ0FBQyxDQUFDLENBQUM7QUFDSixDQUFDLENBQUMsQ0FBQyJ9
|
|
@ -9,7 +9,7 @@ import cp = require('child_process');
|
|||
import assert = require('assert');
|
||||
import net = require('net');
|
||||
import {DebugProtocol} from 'vscode-debugprotocol';
|
||||
import {ProtocolClient} from './ProtocolClient';
|
||||
import {ProtocolClient} from './protocolClient';
|
||||
|
||||
|
||||
export class DebugClient extends ProtocolClient {
|
||||
|
@ -144,6 +144,10 @@ export class DebugClient extends ProtocolClient {
|
|||
return this.send('setBreakpoints', args);
|
||||
}
|
||||
|
||||
public setFunctionBreakpointsRequest(args: DebugProtocol.SetFunctionBreakpointsArguments): Promise<DebugProtocol.SetFunctionBreakpointsResponse> {
|
||||
return this.send('setFunctionBreakpoints', args);
|
||||
}
|
||||
|
||||
public setExceptionBreakpointsRequest(args: DebugProtocol.SetExceptionBreakpointsArguments): Promise<DebugProtocol.SetExceptionBreakpointsResponse> {
|
||||
return this.send('setExceptionBreakpoints', args);
|
||||
}
|
||||
|
@ -237,7 +241,7 @@ export class DebugClient extends ProtocolClient {
|
|||
});
|
||||
}
|
||||
|
||||
private configurationDone() : Promise<any> {
|
||||
private configurationDone() : Promise<DebugProtocol.Response> {
|
||||
if (this._supportsConfigurationDoneRequest) {
|
||||
return this.configurationDoneRequest();
|
||||
} else {
|
||||
|
@ -251,7 +255,7 @@ export class DebugClient extends ProtocolClient {
|
|||
* and the event's reason and line number was asserted.
|
||||
* The promise will be rejected if a timeout occurs, the assertions fail, or if the 'stackTrace' request fails.
|
||||
*/
|
||||
public assertStoppedLocation(reason: string, line: number) : Promise<DebugProtocol.StackTraceResponse> {
|
||||
public assertStoppedLocation(reason: string, expected: { path?: string, line?: number, column?: number } ) : Promise<DebugProtocol.StackTraceResponse> {
|
||||
|
||||
return this.waitForEvent('stopped').then(event => {
|
||||
assert.equal(event.body.reason, reason);
|
||||
|
@ -259,7 +263,16 @@ export class DebugClient extends ProtocolClient {
|
|||
threadId: event.body.threadId
|
||||
});
|
||||
}).then(response => {
|
||||
assert.equal(response.body.stackFrames[0].line, line);
|
||||
const frame = response.body.stackFrames[0];
|
||||
if (typeof expected.path === 'string') {
|
||||
assert.equal(frame.source.path, expected.path, "stopped location: path mismatch");
|
||||
}
|
||||
if (typeof expected.line === 'number') {
|
||||
assert.equal(frame.line, expected.line, "stopped location: line mismatch");
|
||||
}
|
||||
if (typeof expected.column === 'number') {
|
||||
assert.equal(frame.column, expected.column, "stopped location: column mismatch");
|
||||
}
|
||||
return response;
|
||||
});
|
||||
}
|
||||
|
@ -277,7 +290,7 @@ export class DebugClient extends ProtocolClient {
|
|||
const e = <DebugProtocol.OutputEvent> event;
|
||||
if (e.body.category === category) {
|
||||
output += e.body.output;
|
||||
if (output === expected) {
|
||||
if (output.indexOf(expected) === 0) {
|
||||
resolve(event);
|
||||
} else if (expected.indexOf(output) !== 0) {
|
||||
const sanitize = (s: string) => s.toString().replace(/\r/mg, '\\r').replace(/\n/mg, '\\n');
|
||||
|
@ -300,26 +313,38 @@ export class DebugClient extends ProtocolClient {
|
|||
* and the event's reason and line number was asserted.
|
||||
* The promise will be rejected if a timeout occurs, the assertions fail, or if the requests fails.
|
||||
*/
|
||||
public hitBreakpoint(launchArgs: any, program: string, line: number) : Promise<any> {
|
||||
public hitBreakpoint(launchArgs: any, location: { path: string, line: number, column?: number, verified?: boolean }, expected?: { path?: string, line?: number, column?: number, verified?: boolean }) : Promise<any> {
|
||||
|
||||
return Promise.all([
|
||||
|
||||
this.waitForEvent('initialized').then(event => {
|
||||
return this.setBreakpointsRequest({
|
||||
lines: [ line ],
|
||||
breakpoints: [ { line: line } ],
|
||||
source: { path: program }
|
||||
lines: [ location.line ],
|
||||
breakpoints: [ { line: location.line, column: location.column } ],
|
||||
source: { path: location.path }
|
||||
});
|
||||
}).then(response => {
|
||||
|
||||
const bp = response.body.breakpoints[0];
|
||||
assert.equal(bp.verified, true);
|
||||
assert.equal(bp.line, line);
|
||||
|
||||
const verified = (typeof location.verified === 'boolean') ? location.verified : true;
|
||||
assert.equal(bp.verified, verified, "breakpoint verification mismatch: verified");
|
||||
|
||||
if (bp.source && bp.source.path) {
|
||||
assert.equal(bp.source.path, location.path, "breakpoint verification mismatch: path");
|
||||
}
|
||||
if (typeof bp.line === 'number') {
|
||||
assert.equal(bp.line, location.line, "breakpoint verification mismatch: line");
|
||||
}
|
||||
if (typeof location.column === 'number' && typeof bp.column === 'number') {
|
||||
assert.equal(bp.column, location.column, "breakpoint verification mismatch: column");
|
||||
}
|
||||
return this.configurationDone();
|
||||
}),
|
||||
|
||||
this.launch(launchArgs),
|
||||
|
||||
this.assertStoppedLocation('breakpoint', line)
|
||||
this.assertStoppedLocation('breakpoint', expected || location)
|
||||
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -13,6 +13,8 @@ import {DebugProtocol} from 'vscode-debugprotocol';
|
|||
suite('Node Debug Adapter', () => {
|
||||
|
||||
const PROJECT_ROOT = Path.join(__dirname, '../../');
|
||||
const DATA_ROOT = Path.join(PROJECT_ROOT, 'tests/data/');
|
||||
|
||||
const DEBUG_ADAPTER = Path.join(PROJECT_ROOT, 'bin/Release/mono-debug.exe');
|
||||
|
||||
|
||||
|
@ -59,7 +61,7 @@ suite('Node Debug Adapter', () => {
|
|||
|
||||
test('should run program to the end', () => {
|
||||
|
||||
const PROGRAM = Path.join(PROJECT_ROOT, 'tests/data/simple/Program.exe');
|
||||
const PROGRAM = Path.join(DATA_ROOT, 'simple/Program.exe');
|
||||
|
||||
return Promise.all([
|
||||
dc.configurationSequence(),
|
||||
|
@ -70,7 +72,7 @@ suite('Node Debug Adapter', () => {
|
|||
|
||||
test('should stop on debugger statement', () => {
|
||||
|
||||
const PROGRAM = Path.join(PROJECT_ROOT, 'tests/data/simple_break/Program.exe');
|
||||
const PROGRAM = Path.join(DATA_ROOT, 'simple_break/Program.exe');
|
||||
const DEBUGGER_LINE = 10;
|
||||
|
||||
return Promise.all([
|
||||
|
@ -83,18 +85,18 @@ suite('Node Debug Adapter', () => {
|
|||
|
||||
suite('setBreakpoints', () => {
|
||||
|
||||
const PROGRAM = Path.join(PROJECT_ROOT, 'tests/data/simple/Program.exe');
|
||||
const SOURCE = Path.join(PROJECT_ROOT, 'tests/data/simple/Program.cs');
|
||||
const PROGRAM = Path.join(DATA_ROOT, 'simple/Program.exe');
|
||||
const SOURCE = Path.join(DATA_ROOT, 'simple/Program.cs');
|
||||
const BREAKPOINT_LINE = 10;
|
||||
|
||||
test('should stop on a breakpoint', () => {
|
||||
return dc.hitBreakpoint({ program: PROGRAM }, SOURCE, BREAKPOINT_LINE);
|
||||
return dc.hitBreakpoint({ program: PROGRAM }, { path: SOURCE, line: BREAKPOINT_LINE } );
|
||||
});
|
||||
});
|
||||
|
||||
suite('output events', () => {
|
||||
|
||||
const PROGRAM = Path.join(PROJECT_ROOT, 'tests/data/output/Output.exe');
|
||||
const PROGRAM = Path.join(DATA_ROOT, 'output/Output.exe');
|
||||
|
||||
test('stdout and stderr events should be complete and in correct order', () => {
|
||||
return Promise.all([
|
||||
|
|
Загрузка…
Ссылка в новой задаче