From 4046c171d7b0ac458fe590293919b7579ecb1bd1 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Fri, 16 Mar 2018 11:16:50 -0600 Subject: [PATCH] Add supportsLogPoints for Microsoft/vscode-node-debug2#163 --- package-lock.json | 30 ++++++++++++++++++------------ package.json | 6 +++--- src/nodeDebugAdapter.ts | 8 +++++--- 3 files changed, 26 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5f29db37..d5556a7a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6162,16 +6162,16 @@ } }, "vscode-chrome-debug-core": { - "version": "3.23.6", - "resolved": "https://registry.npmjs.org/vscode-chrome-debug-core/-/vscode-chrome-debug-core-3.23.6.tgz", - "integrity": "sha512-2w4/NXws94XP+93D5PGbCzCw/n8K6QRVlNqU4BCqclNHQoD2FlhMLpmMCozmPW+7cdPmjGmtfgmi3JY2MdgKsQ==", + "version": "3.23.8", + "resolved": "https://registry.npmjs.org/vscode-chrome-debug-core/-/vscode-chrome-debug-core-3.23.8.tgz", + "integrity": "sha512-+WUVaOXz+kXsqszFRVioWx9jdJxFTd2tw2t8w2vsrpRskGDgh61pDmISVmyRgAXpHHY2dkeVkOR1/oTGLXFABA==", "requires": { "@types/source-map": "0.1.29", "glob": "7.1.2", "noice-json-rpc": "1.0.1", "source-map": "0.6.1", - "vscode-debugadapter": "1.27.0", - "vscode-debugprotocol": "1.27.0", + "vscode-debugadapter": "1.28.0-pre.2", + "vscode-debugprotocol": "1.28.0-pre.1", "vscode-nls": "3.2.1", "ws": "3.3.3" }, @@ -6193,11 +6193,12 @@ } }, "vscode-debugadapter": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/vscode-debugadapter/-/vscode-debugadapter-1.27.0.tgz", - "integrity": "sha512-JwE3fWmKnpjYnFqhff0umqIJi4c26gh/CXZ5LNb4gLIuPd5sEAEoEbGeCcAaajuTrVxFw6FlYEep9y+IQCf+ww==", + "version": "1.28.0-pre.2", + "resolved": "https://registry.npmjs.org/vscode-debugadapter/-/vscode-debugadapter-1.28.0-pre.2.tgz", + "integrity": "sha512-adrxvHhRWJqIaF/xycnHi5hs/rNYwJDQ8jJGUykiq6Ty4ligtspGtk4Q+sytCqfRI/a8TVMH9/A4cWThmIrqWw==", "requires": { - "vscode-debugprotocol": "1.27.0" + "vscode-debugprotocol": "1.28.0-pre.1", + "vscode-uri": "1.0.1" } }, "vscode-debugadapter-testsupport": { @@ -6218,9 +6219,9 @@ } }, "vscode-debugprotocol": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/vscode-debugprotocol/-/vscode-debugprotocol-1.27.0.tgz", - "integrity": "sha512-cg3lKqVwxNpO2pLBxSwkBvE7w06+bHfbA/s14u8izSWyhJtPgRu1lQwi5tEyTRuwfEugfoPwerYL4vtY6teQDw==" + "version": "1.28.0-pre.1", + "resolved": "https://registry.npmjs.org/vscode-debugprotocol/-/vscode-debugprotocol-1.28.0-pre.1.tgz", + "integrity": "sha512-0sTom5SHITRGal1CJj58kcTHirp1o4tJ9cyXLBQdn7QoimzmAGee7dPs/jZ6MxPwnCzIkOxu6dwlBkvE486wow==" }, "vscode-nls": { "version": "3.2.1", @@ -6286,6 +6287,11 @@ } } }, + "vscode-uri": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-1.0.1.tgz", + "integrity": "sha1-Eahr7+rDxKo+wIYjZRo8gabQu8g=" + }, "vso-node-api": { "version": "6.1.2-preview", "resolved": "https://registry.npmjs.org/vso-node-api/-/vso-node-api-6.1.2-preview.tgz", diff --git a/package.json b/package.json index 9f6016a6..a035f2ec 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,8 @@ "license": "MIT", "private": true, "dependencies": { - "vscode-chrome-debug-core": "^3.23.6", - "vscode-debugadapter": "^1.27.0", + "vscode-chrome-debug-core": "^3.23.8", + "vscode-debugadapter": "^1.28.0-pre.2", "vscode-nls": "^3.2.1" }, "devDependencies": { @@ -37,7 +37,7 @@ "vscode": "^1.1.9", "vscode-chrome-debug-core-testsupport": "^4.0.0", "vscode-debugadapter-testsupport": "^1.25.0", - "vscode-debugprotocol": "^1.27.0", + "vscode-debugprotocol": "^1.28.0-pre.1", "vscode-nls-dev": "^3.0.7" }, "main": "./out/src/extension", diff --git a/src/nodeDebugAdapter.ts b/src/nodeDebugAdapter.ts index e5fc7cf9..d397b3d0 100644 --- a/src/nodeDebugAdapter.ts +++ b/src/nodeDebugAdapter.ts @@ -2,7 +2,7 @@ * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ -import {ChromeDebugAdapter, chromeUtils, ISourceMapPathOverrides, utils as CoreUtils, logger, telemetry as CoreTelemetry, ISetBreakpointResult, ISetBreakpointsArgs, Crdp} from 'vscode-chrome-debug-core'; +import {ChromeDebugAdapter, chromeUtils, ISourceMapPathOverrides, utils as CoreUtils, logger, telemetry as CoreTelemetry, ISetBreakpointResult, ISetBreakpointsArgs, Crdp, InternalSourceBreakpoint} from 'vscode-chrome-debug-core'; const telemetry = CoreTelemetry.telemetry; import {DebugProtocol} from 'vscode-debugprotocol'; @@ -71,7 +71,9 @@ export class NodeDebugAdapter extends ChromeDebugAdapter { localize = nls.config({ locale: args.locale })(); } - return super.initialize(args); + const capabilities = super.initialize(args); + capabilities.supportsLogPoints = true; + return capabilities; } public async launch(args: ILaunchRequestArguments): Promise { @@ -588,7 +590,7 @@ export class NodeDebugAdapter extends ChromeDebugAdapter { /** * Override addBreakpoints, which is called by setBreakpoints to make the actual call to Chrome. */ - protected addBreakpoints(url: string, breakpoints: DebugProtocol.SourceBreakpoint[]): Promise { + protected addBreakpoints(url: string, breakpoints: InternalSourceBreakpoint[]): Promise { return super.addBreakpoints(url, breakpoints).then(responses => { if (this._entryPauseEvent && !this._finishedConfig) { const entryLocation = this._entryPauseEvent.callFrames[0].location;