diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 65c8a42b..e715c0e0 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1 +1,6 @@ -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. +This project has adopted the +[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information see the +[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or +contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any +additional questions or comments. diff --git a/README.md b/README.md index 5e604091..7b51b023 100644 --- a/README.md +++ b/README.md @@ -3,16 +3,19 @@ [![build status](https://travis-ci.org/Microsoft/vscode-node-debug.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-node-debug) [![build status](https://ci.appveyor.com/api/projects/status/t74psolxi3k7bcjp/branch/master?svg=true)](https://ci.appveyor.com/project/weinand/vscode-node-debug) -This extension is bundled with Visual Studio Code and together with **Node Debug** forms the [Node.js](https://nodejs.org) debugging experience. +This extension is bundled with Visual Studio Code and together with **Node +Debug** forms the [Node.js](https://nodejs.org) debugging experience. **Node debug (legacy)** is the debugger for Node.js versions < 8.0. -See a general overview of debugging in VS Code [here](https://code.visualstudio.com/docs/editor/debugging). +See a general overview of debugging in VS Code +[here](https://code.visualstudio.com/docs/editor/debugging). -Documentation for Node.js specific debugging can be found [here](https://code.visualstudio.com/docs/nodejs/nodejs-debugging). - -Please submit bugs and feature requests to the [VS Code repository](https://github.com/microsoft/vscode/issues). +Documentation for Node.js specific debugging can be found +[here](https://code.visualstudio.com/docs/nodejs/nodejs-debugging). +Please submit bugs and feature requests to the +[VS Code repository](https://github.com/microsoft/vscode/issues). ## License diff --git a/SECURITY.md b/SECURITY.md index a050f362..1e954368 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,33 +2,54 @@ ## Security -Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). - -If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below. +Microsoft takes the security of our software products and services seriously, +which includes all source code repositories managed through our GitHub +organizations, which include [Microsoft](https://github.com/Microsoft), +[Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), +[AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and +[our GitHub organizations](https://opensource.microsoft.com/). + +If you believe you have found a security vulnerability in any Microsoft-owned +repository that meets +[Microsoft's definition of a security vulnerability](), +please report it to us as described below. ## Reporting Security Issues **Please do not report security vulnerabilities through public GitHub issues.** -Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). +Instead, please report them to the Microsoft Security Response Center (MSRC) at +[https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). -If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc). +If you prefer to submit without logging in, send email to +[secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your +message with our PGP key; please download it from the +[Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc). -You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). +You should receive a response within 24 hours. If for some reason you do not, +please follow up via email to ensure we received your original message. +Additional information can be found at +[microsoft.com/msrc](https://www.microsoft.com/msrc). -Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: +Please include the requested information listed below (as much as you can +provide) to help us better understand the nature and scope of the possible +issue: - * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) - * Full paths of source file(s) related to the manifestation of the issue - * The location of the affected source code (tag/branch/commit or direct URL) - * Any special configuration required to reproduce the issue - * Step-by-step instructions to reproduce the issue - * Proof-of-concept or exploit code (if possible) - * Impact of the issue, including how an attacker might exploit the issue +- Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, + etc.) +- Full paths of source file(s) related to the manifestation of the issue +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- Step-by-step instructions to reproduce the issue +- Proof-of-concept or exploit code (if possible) +- Impact of the issue, including how an attacker might exploit the issue This information will help us triage your report more quickly. -If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs. +If you are reporting for a bug bounty, more complete reports can contribute to a +higher bounty award. Please visit our +[Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more +details about our active programs. ## Preferred Languages @@ -36,6 +57,7 @@ We prefer all communications to be in English. ## Policy -Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). +Microsoft follows the principle of +[Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). diff --git a/Source/node/debugInjection.js b/Source/node/debugInjection.js index 73c8d59a..8cca0c97 100644 --- a/Source/node/debugInjection.js +++ b/Source/node/debugInjection.js @@ -39,7 +39,7 @@ return ( mirror.propertyNames( PropertyKind.Named | PropertyKind.Indexed, - limit, + limit ).length >= limit ); }; @@ -100,7 +100,7 @@ */ try { var JSONProtocolSerializer = vm.runInDebugContext( - "JSONProtocolSerializer", + "JSONProtocolSerializer" ); JSONProtocolSerializer.prototype.serializeReferencedObjects = @@ -136,7 +136,7 @@ */ DebugCommandProcessor.prototype.dispatch_["vscode_slice"] = function ( request, - response, + response ) { var handle = request.arguments.handle; var start = request.arguments.start; @@ -161,7 +161,7 @@ if (mirror.isArray()) { var a = mirror.indexedPropertiesFromRange( start, - start + count - 1, + start + count - 1 ); for (var i = 0; i < a.length; i++) { result.push({ @@ -230,7 +230,7 @@ */ DebugCommandProcessor.prototype.dispatch_["vscode_lookup"] = function ( request, - response, + response ) { var result = this.lookupRequest_(request, response); if (!result && response.body) { @@ -249,7 +249,7 @@ */ DebugCommandProcessor.prototype.dispatch_["vscode_evaluate"] = function ( request, - response, + response ) { var result = this.evaluateRequest_(request, response); if (!result) { @@ -263,7 +263,7 @@ */ DebugCommandProcessor.prototype.dispatch_["vscode_scopes"] = function ( request, - response, + response ) { var result = this.scopesRequest_(request, response); if (!result) { diff --git a/Source/node/extension/autoAttach.ts b/Source/node/extension/autoAttach.ts index 8154f368..73cb49bf 100644 --- a/Source/node/extension/autoAttach.ts +++ b/Source/node/extension/autoAttach.ts @@ -19,7 +19,7 @@ const pids: Promise[] = []; let autoAttacher: vscode.Disposable | undefined; export function getPidFromSession( - session: vscode.DebugSession, + session: vscode.DebugSession ): Promise { return new Promise((resolve, e) => { setTimeout( @@ -43,14 +43,14 @@ export function getPidFromSession( (e) => { clearTimeout(timer); resolve(NaN); - }, + } ); } else { clearTimeout(timer); resolve(NaN); } }, - session.type === "legacy-node2" ? 500 : 100, + session.type === "legacy-node2" ? 500 : 100 ); }); } @@ -65,7 +65,7 @@ export function initializeAutoAttach(context: vscode.ExtensionContext) { // try to get pid from newly started node.js debug session pids.push(getPidFromSession(session)); } - }), + }) ); context.subscriptions.push( @@ -82,15 +82,15 @@ export function initializeAutoAttach(context: vscode.ExtensionContext) { const name = localize( "process.with.pid.label", "Auto attached ({0})", - pid, + pid ); attachToProcess(undefined, name, pid, args); } - }, + } ); } - }, - ), + } + ) ); context.subscriptions.push( @@ -101,8 +101,8 @@ export function initializeAutoAttach(context: vscode.ExtensionContext) { autoAttacher.dispose(); autoAttacher = undefined; } - }, - ), + } + ) ); } @@ -118,7 +118,7 @@ export function attachToProcess( pid: number, args: string, baseConfig?: vscode.DebugConfiguration, - parentSession?: vscode.DebugSession, + parentSession?: vscode.DebugSession ) { alreadyAttached(pid).then((isAttached) => { if (isAttached) { @@ -191,7 +191,7 @@ export function attachToProcess( function pollProcesses( rootPid: number, inTerminal: boolean, - cb: (pid: number, cmd: string, args: string) => void, + cb: (pid: number, cmd: string, args: string) => void ): vscode.Disposable { let stopped = false; @@ -215,12 +215,12 @@ function pollProcesses( function findChildProcesses( rootPid: number, inTerminal: boolean, - cb: (pid: number, cmd: string, args: string) => void, + cb: (pid: number, cmd: string, args: string) => void ): Promise { function walker( node: ProcessTreeNode, terminal: boolean, - terminalPids: (number | undefined)[], + terminalPids: (number | undefined)[] ) { if (terminalPids.indexOf(node.pid) >= 0) { terminal = true; // found the terminal shell @@ -241,7 +241,7 @@ function findChildProcesses( const terminals = vscode.window.terminals; if (terminals.length > 0) { Promise.all( - terminals.map((terminal) => terminal.processId), + terminals.map((terminal) => terminal.processId) ).then((terminalPids) => { walker(tree, !inTerminal, terminalPids); }); diff --git a/Source/node/extension/cluster.ts b/Source/node/extension/cluster.ts index 9c12fd0b..8b13ba6b 100644 --- a/Source/node/extension/cluster.ts +++ b/Source/node/extension/cluster.ts @@ -24,7 +24,7 @@ export class Cluster { public static prepareAutoAttachChildProcesses( folder: vscode.WorkspaceFolder | undefined, - config: vscode.DebugConfiguration, + config: vscode.DebugConfiguration ) { this.clusters.set(config.name, new Cluster(folder, config)); } @@ -46,7 +46,7 @@ export class Cluster { private constructor( private _folder: vscode.WorkspaceFolder | undefined, - private _config: vscode.DebugConfiguration, + private _config: vscode.DebugConfiguration ) { this._subProcesses = new Set(); this._childCounter = 1; @@ -63,7 +63,7 @@ export class Cluster { const name = localize( "child.process.with.pid.label", "Child process {0}", - this._childCounter++, + this._childCounter++ ); attachToProcess( this._folder, @@ -71,7 +71,7 @@ export class Cluster { pid, args, this._config, - session, + session ); } }); @@ -92,7 +92,7 @@ export class Cluster { function pollProcesses( rootPid: number, inTerminal: boolean, - cb: (pid: number, cmd: string, args: string) => void, + cb: (pid: number, cmd: string, args: string) => void ): vscode.Disposable { let stopped = false; @@ -115,7 +115,7 @@ function pollProcesses( function findChildProcesses( rootPid: number, - cb: (pid: number, cmd: string, args: string) => void, + cb: (pid: number, cmd: string, args: string) => void ): Promise { function walker(node: ProcessTreeNode) { if (node.pid !== rootPid) { diff --git a/Source/node/extension/configurationProvider.ts b/Source/node/extension/configurationProvider.ts index 95f5f650..b5dca57c 100644 --- a/Source/node/extension/configurationProvider.ts +++ b/Source/node/extension/configurationProvider.ts @@ -43,7 +43,7 @@ export class NodeConfigurationProvider resolveDebugConfiguration( folder: vscode.WorkspaceFolder | undefined, config: vscode.DebugConfiguration, - token?: vscode.CancellationToken, + token?: vscode.CancellationToken ): vscode.ProviderResult { return this.resolveConfigAsync(folder, config).catch((err) => { return vscode.window @@ -58,7 +58,7 @@ export class NodeConfigurationProvider private async resolveConfigAsync( folder: vscode.WorkspaceFolder | undefined, config: vscode.DebugConfiguration, - token?: vscode.CancellationToken, + token?: vscode.CancellationToken ): Promise { // if launch.json is missing or empty if (!config.type && !config.request && !config.name) { @@ -68,8 +68,8 @@ export class NodeConfigurationProvider throw new Error( localize( "program.not.found.message", - "Cannot find a program to debug", - ), + "Cannot find a program to debug" + ) ); } } @@ -165,7 +165,7 @@ export class NodeConfigurationProvider config.logFilePath = join( this._extensionContext.logPath, - fileName, + fileName ); } } @@ -183,11 +183,11 @@ export class NodeConfigurationProvider resolveDebugConfigurationWithSubstitutedVariables( folder: vscode.WorkspaceFolder | undefined, config: vscode.DebugConfiguration, - token?: vscode.CancellationToken, + token?: vscode.CancellationToken ): vscode.ProviderResult { return this.resolveConfigWithSubstitutedVariablesAsync( folder, - config, + config ).catch((err) => { return vscode.window .showErrorMessage(err.message, { modal: true }) @@ -200,7 +200,7 @@ export class NodeConfigurationProvider */ private async resolveConfigWithSubstitutedVariablesAsync( folder: vscode.WorkspaceFolder | undefined, - config: vscode.DebugConfiguration, + config: vscode.DebugConfiguration ): Promise { // attach to process by processId if ( @@ -224,7 +224,7 @@ export class NodeConfigurationProvider const associations = vscode.workspace.getConfiguration("files.associations"); const extension = vscode.extensions.getExtension<{}>( - "ms-vscode.node-debug", + "ms-vscode.node-debug" ); if (!extension) { throw new Error("Expected to be able to load extension data"); @@ -232,12 +232,12 @@ export class NodeConfigurationProvider const handledLanguages = extension.packageJSON.contributes.breakpoints.map( - (b) => b.language, + (b) => b.language ); return Object.keys(associations) .filter( (pattern) => - handledLanguages.indexOf(associations[pattern]) !== -1, + handledLanguages.indexOf(associations[pattern]) !== -1 ) .concat(DEFAULT_JS_PATTERNS); } @@ -257,15 +257,15 @@ export class NodeConfigurationProvider localize( "useWslDeprecationWarning.title", "Attribute 'useWSL' is deprecated. Please use the 'Remote WSL' extension instead. Click [here]({0}) to learn more.", - "https://go.microsoft.com/fwlink/?linkid=2097212", + "https://go.microsoft.com/fwlink/?linkid=2097212" ), { title: localize( "useWslDeprecationWarning.doNotShowAgain", - "Don't Show Again", + "Don't Show Again" ), id: 1, - }, + } ) .then((selected) => { if (!selected) { @@ -278,7 +278,7 @@ export class NodeConfigurationProvider .update( SHOW_USE_WSL_IS_DEPRECATED_WARNING_SETTING, false, - vscode.ConfigurationTarget.Global, + vscode.ConfigurationTarget.Global ); break; } @@ -321,8 +321,8 @@ export class NodeConfigurationProvider throw new Error( localize( "NVS_HOME.not.found.message", - "Attribute 'runtimeVersion' requires Node.js version manager 'nvs'.", - ), + "Attribute 'runtimeVersion' requires Node.js version manager 'nvs'." + ) ); } } @@ -335,8 +335,8 @@ export class NodeConfigurationProvider throw new Error( localize( "NVM_HOME.not.found.message", - "Attribute 'runtimeVersion' requires Node.js version manager 'nvm-windows' or 'nvs'.", - ), + "Attribute 'runtimeVersion' requires Node.js version manager 'nvm-windows' or 'nvs'." + ) ); } bin = join(nvmHome, `v${config.runtimeVersion}`); @@ -355,8 +355,8 @@ export class NodeConfigurationProvider throw new Error( localize( "NVM_DIR.not.found.message", - "Attribute 'runtimeVersion' requires Node.js version manager 'nvm' or 'nvs'.", - ), + "Attribute 'runtimeVersion' requires Node.js version manager 'nvm' or 'nvs'." + ) ); } bin = join( @@ -364,7 +364,7 @@ export class NodeConfigurationProvider "versions", "node", `v${config.runtimeVersion}`, - "bin", + "bin" ); versionManagerName = "nvm"; } @@ -385,8 +385,8 @@ export class NodeConfigurationProvider "runtime.version.not.found.message", "Node.js version '{0}' not installed for '{1}'.", config.runtimeVersion, - versionManagerName, - ), + versionManagerName + ) ); } } @@ -397,7 +397,7 @@ export class NodeConfigurationProvider function createLaunchConfigFromContext( folder: vscode.WorkspaceFolder | undefined, resolve: boolean, - existingConfig?: vscode.DebugConfiguration, + existingConfig?: vscode.DebugConfiguration ): vscode.DebugConfiguration { const config = { type: "legacy-node", @@ -422,8 +422,8 @@ function createLaunchConfigFromContext( ], }, "Launch configuration for '{0}' project created.", - "Mern Starter", - ), + "Mern Starter" + ) ); } configureMern(config); @@ -438,8 +438,8 @@ function createLaunchConfigFromContext( writeToConsole( localize( "program.guessed.from.package.json.explanation", - "Launch configuration created based on 'package.json'.", - ), + "Launch configuration created based on 'package.json'." + ) ); } } @@ -454,12 +454,12 @@ function createLaunchConfigFromContext( isTranspiledLanguage(languageId) ) { const wf = vscode.workspace.getWorkspaceFolder( - editor.document.uri, + editor.document.uri ); if (wf && wf === folder) { program = relative( wf.uri.fsPath || "/", - editor.document.uri.fsPath || "/", + editor.document.uri.fsPath || "/" ); if (program && !isAbsolute(program)) { program = join("${workspaceFolder}", program); @@ -483,15 +483,15 @@ function createLaunchConfigFromContext( if ( useSourceMaps || vscode.workspace.textDocuments.some((document) => - isTranspiledLanguage(document.languageId), + isTranspiledLanguage(document.languageId) ) ) { if (resolve) { writeToConsole( localize( "outFiles.explanation", - "Adjust glob pattern(s) in the 'outFiles' attribute so that they cover the generated JavaScript.", - ), + "Adjust glob pattern(s) in the 'outFiles' attribute so that they cover the generated JavaScript." + ) ); } @@ -523,7 +523,7 @@ function createLaunchConfigFromContext( function loadJSON( folder: vscode.WorkspaceFolder | undefined, - file: string, + file: string ): any { if (folder) { try { @@ -560,7 +560,7 @@ function isTranspiledLanguage(languagId: string): boolean { function guessProgramFromPackage( folder: vscode.WorkspaceFolder | undefined, packageJson: any, - resolve: boolean, + resolve: boolean ): string | undefined { let program: string | undefined; @@ -603,7 +603,7 @@ function guessProgramFromPackage( async function determineDebugType( config: any, - logger: Logger, + logger: Logger ): Promise { if (config.protocol === "legacy") { return "legacy-node"; diff --git a/Source/node/extension/extension.ts b/Source/node/extension/extension.ts index 36328da8..bf1bfd9c 100644 --- a/Source/node/extension/extension.ts +++ b/Source/node/extension/extension.ts @@ -16,8 +16,8 @@ export function activate(context: vscode.ExtensionContext) { context.subscriptions.push( vscode.debug.registerDebugConfigurationProvider( "legacy-node", - new NodeConfigurationProvider(context), - ), + new NodeConfigurationProvider(context) + ) ); // auto attach @@ -27,36 +27,36 @@ export function activate(context: vscode.ExtensionContext) { context.subscriptions.push( vscode.commands.registerCommand( "extension.node-debug.toggleSkippingFile", - toggleSkippingFile, - ), + toggleSkippingFile + ) ); // process picker command context.subscriptions.push( vscode.commands.registerCommand( "extension.pickNodeProcess", - pickProcess, - ), + pickProcess + ) ); // attach process command context.subscriptions.push( vscode.commands.registerCommand( "extension.node-debug.attachNodeProcess", - attachProcess, - ), + attachProcess + ) ); // cluster context.subscriptions.push( vscode.debug.onDidStartDebugSession((session) => - Cluster.startSession(session), - ), + Cluster.startSession(session) + ) ); context.subscriptions.push( vscode.debug.onDidTerminateDebugSession((session) => - Cluster.stopSession(session), - ), + Cluster.stopSession(session) + ) ); } @@ -79,7 +79,7 @@ function toggleSkippingFile(res: string | number): void { : { sourceReference: resource }; vscode.debug.activeDebugSession.customRequest( "toggleSkipFileStatus", - args, + args ); } } diff --git a/Source/node/extension/processPicker.ts b/Source/node/extension/processPicker.ts index cc7a6f2b..056fe9fd 100644 --- a/Source/node/extension/processPicker.ts +++ b/Source/node/extension/processPicker.ts @@ -49,13 +49,13 @@ export async function attachProcess() { * Process the special protocol/processId/port patterns that the process picker puts in the "processId" attribute. */ export async function resolveProcessId( - config: vscode.DebugConfiguration, + config: vscode.DebugConfiguration ): Promise { let processId = config.processId.trim(); const matches = /^(inspector|legacy)?([0-9]+)(inspector|legacy)?([0-9]+)?$/.exec( - processId, + processId ); if (matches && matches.length === 5) { if (matches[2] && matches[3] && matches[4]) { @@ -82,7 +82,7 @@ export async function resolveProcessId( const debugType = await determineDebugTypeForPidInDebugMode( config, - pid, + pid ); if (debugType) { // processID is handled, so turn this config into a normal port attach configuration @@ -98,8 +98,8 @@ export async function resolveProcessId( localize( "pid.error", "Attach to process: cannot put process '{0}' in debug mode.", - processId, - ), + processId + ) ); } } @@ -109,8 +109,8 @@ export async function resolveProcessId( localize( "process.id.error", "Attach to process: '{0}' doesn't look like a process id.", - processId, - ), + processId + ) ); } } @@ -129,7 +129,7 @@ export function pickProcess(ports?): Promise { let options: vscode.QuickPickOptions = { placeHolder: localize( "pickNodeProcess", - "Pick the node.js process to attach to", + "Pick the node.js process to attach to" ), matchOnDescription: true, matchOnDetail: true, @@ -144,9 +144,9 @@ export function pickProcess(ports?): Promise { localize( "process.picker.error", "Process picker failed ({0})", - err.message, + err.message ), - { modal: true }, + { modal: true } ) .then((_) => null); }); @@ -167,7 +167,7 @@ function listProcesses(ports: boolean): Promise { ppid: number, command: string, args: string, - date: number, + date: number ) => { if ( process.platform === "win32" && @@ -199,14 +199,14 @@ function listProcesses(ports: boolean): Promise { "process.id.port", "process id: {0}, debug port: {1}", pid, - port, + port ); } else { description = localize( "process.id.port.legacy", "process id: {0}, debug port: {1} (legacy protocol)", pid, - port, + port ); } pidOrPort = `${protocol}${port}`; @@ -217,7 +217,7 @@ function listProcesses(ports: boolean): Promise { "process id: {0}, debug port: {1} ({2})", pid, port, - "SIGUSR1", + "SIGUSR1" ); pidOrPort = `${pid}${protocol}${port}`; } else { @@ -227,7 +227,7 @@ function listProcesses(ports: boolean): Promise { "process.id.signal", "process id: {0} ({1})", pid, - "SIGUSR1", + "SIGUSR1" ); pidOrPort = pid.toString(); } @@ -247,7 +247,7 @@ function listProcesses(ports: boolean): Promise { sortKey: date ? date : seq++, }); } - }, + } ).then(() => items.sort((a, b) => b.sortKey - a.sortKey)); // sort items by process id, newest first } @@ -269,15 +269,15 @@ function putPidInDebugMode(pid: number): void { "cannot.enable.debug.mode.error", "Attach to process: cannot enable debug mode for process '{0}' ({1}).", pid, - e, - ), + e + ) ); } } function determineDebugTypeForPidInDebugMode( config: any, - pid: number, + pid: number ): Promise { let debugProtocolP: Promise; if (config.port === INSPECTOR_PORT_DEFAULT) { @@ -294,7 +294,7 @@ function determineDebugTypeForPidInDebugMode( return debugProtocol === "inspector" ? "legacy-node2" : debugProtocol === "legacy" - ? "legacy-node" - : null; + ? "legacy-node" + : null; }); } diff --git a/Source/node/extension/processTree.ts b/Source/node/extension/processTree.ts index 73baf673..1a6728cd 100644 --- a/Source/node/extension/processTree.ts +++ b/Source/node/extension/processTree.ts @@ -15,12 +15,12 @@ export class ProcessTreeNode { public pid: number, public ppid: number, public command: string, - public args: string, + public args: string ) {} } export async function getProcessTree( - rootPid: number, + rootPid: number ): Promise { const map = new Map(); @@ -32,7 +32,7 @@ export async function getProcessTree( if (pid !== ppid) { map.set(pid, new ProcessTreeNode(pid, ppid, command, args)); } - }, + } ); } catch (err) { return undefined; @@ -61,8 +61,8 @@ export function getProcesses( ppid: number, command: string, args: string, - date?: number, - ) => void, + date?: number + ) => void ): Promise { // returns a function that aggregates chunks of data until one or more complete lines are received and passes them to a callback. function lines(callback: (a: string) => void) { @@ -90,7 +90,7 @@ export function getProcesses( process.env["WINDIR"] || "C:\\Windows", "System32", "wbem", - "WMIC.exe", + "WMIC.exe" ); proc = spawn(wmic, [ "process", @@ -127,7 +127,7 @@ export function getProcesses( one(pid, ppid, command, args, date); } } - }), + }) ); } else if (process.platform === "darwin") { // OS X @@ -149,7 +149,7 @@ export function getProcesses( if (!isNaN(pid) && !isNaN(ppid)) { one(pid, ppid, command, args); } - }), + }) ); } else { // linux @@ -185,7 +185,7 @@ export function getProcesses( if (!isNaN(pid) && !isNaN(ppid)) { one(pid, ppid, command, args); } - }), + }) ); } @@ -220,7 +220,7 @@ export function getProcesses( //resolve(); } else if (code > 0) { reject( - new Error(`process terminated with exit code: ${code}`), + new Error(`process terminated with exit code: ${code}`) ); } } diff --git a/Source/node/extension/protocolDetection.ts b/Source/node/extension/protocolDetection.ts index 9e87e074..aa034837 100644 --- a/Source/node/extension/protocolDetection.ts +++ b/Source/node/extension/protocolDetection.ts @@ -20,7 +20,7 @@ const InspectorMinNodeVersionLaunch = 80000; export function detectDebugType( config: any, - logger: Logger, + logger: Logger ): Promise { switch (config.request) { case "attach": @@ -34,7 +34,7 @@ export function detectDebugType( return Promise.resolve( detectProtocolForLaunch(config, logger) === "inspector" ? "legacy-node2" - : "legacy-node", + : "legacy-node" ); default: // should not happen @@ -49,7 +49,7 @@ export function detectDebugType( */ function detectProtocolForAttach( config: any, - logger: Logger, + logger: Logger ): Promise { const address = config.address || "127.0.0.1"; const port = config.port; @@ -57,7 +57,7 @@ function detectProtocolForAttach( const cleanup = () => { try { socket.write( - `"Content-Length: 50\r\n\r\n{"command":"disconnect","type":"request","seq":2}"`, + `"Content-Length: 50\r\n\r\n{"command":"disconnect","type":"request","seq":2}"` ); socket.end(); } catch (e) { @@ -73,13 +73,13 @@ function detectProtocolForAttach( const dataStr = data.toString(); if (dataStr.indexOf("WebSockets request was expected") >= 0) { logger.debug( - "Debugging with inspector protocol because it was detected.", + "Debugging with inspector protocol because it was detected." ); protocol = "inspector"; } else { reason = localize( "protocol.switch.legacy.detected", - "Debugging with legacy protocol because it was detected.", + "Debugging with legacy protocol because it was detected." ); protocol = "legacy"; } @@ -95,7 +95,7 @@ function detectProtocolForAttach( socket.on("connect", () => { // Send a safe request to trigger a response from the inspector protocol socket.write( - `Content-Length: 102\r\n\r\n{"command":"evaluate","arguments":{"expression":"process.pid","global":true},"type":"request","seq":1}`, + `Content-Length: 102\r\n\r\n{"command":"evaluate","arguments":{"expression":"process.pid","global":true},"type":"request","seq":1}` ); }); @@ -103,14 +103,14 @@ function detectProtocolForAttach( // No data or error received? Bail and let the debug adapter handle it. reject(new Error("timeout")); }, 2000); - }, + } ) .catch((err) => { return { reason: localize( "protocol.switch.unknown.error", "Debugging with inspector protocol because Node.js version could not be determined ({0})", - err.toString(), + err.toString() ), protocol: "inspector", }; @@ -128,11 +128,11 @@ function detectProtocolForAttach( function detectProtocolForLaunch( config: any, - logger: Logger, + logger: Logger ): "legacy" | "inspector" { if (config.runtimeExecutable) { logger.debug( - "Debugging with inspector protocol because a runtime executable is set.", + "Debugging with inspector protocol because a runtime executable is set." ); return "inspector"; } else { @@ -155,7 +155,7 @@ function detectProtocolForLaunch( InspectorMinNodeVersionLaunch ) { logger.debug( - `Debugging with inspector protocol because Node.js ${config.__nodeVersion} was detected.`, + `Debugging with inspector protocol because Node.js ${config.__nodeVersion} was detected.` ); return "inspector"; } else { @@ -163,17 +163,17 @@ function detectProtocolForLaunch( localize( "protocol.switch.legacy.version", "Debugging with legacy protocol because Node.js {0} was detected.", - config.__nodeVersion, - ), + config.__nodeVersion + ) ); logger.debug( - `Debugging with legacy protocol because Node.js ${config.__nodeVersion} was detected.`, + `Debugging with legacy protocol because Node.js ${config.__nodeVersion} was detected.` ); return "legacy"; } } else { logger.debug( - "Debugging with inspector protocol because Node.js version could not be determined.", + "Debugging with inspector protocol because Node.js version could not be determined." ); return "inspector"; } @@ -205,8 +205,8 @@ function detectProtocolForPidWin(pid: number): Promise { return ports.indexOf(INSPECTOR_PORT_DEFAULT) >= 0 ? "inspector" : ports.indexOf(LEGACY_PORT_DEFAULT) >= 0 - ? "legacy" - : null; + ? "legacy" + : null; }); } @@ -248,7 +248,7 @@ function detectProtocolForPidUnix(pid: number): Promise { } else { return getPidListeningOnPortUnix(LEGACY_PORT_DEFAULT).then( (legacyProtocolPid) => - legacyProtocolPid === pid ? "legacy" : null, + legacyProtocolPid === pid ? "legacy" : null ); } }); diff --git a/Source/node/nodeDebug.ts b/Source/node/nodeDebug.ts index f0a3539c..d6108035 100644 --- a/Source/node/nodeDebug.ts +++ b/Source/node/nodeDebug.ts @@ -72,12 +72,12 @@ export interface VariableContainer { session: NodeDebugSession, filter: FilterType, start: number | undefined, - count: number | undefined, + count: number | undefined ): Promise; SetValue( session: NodeDebugSession, name: string, - value: string, + value: string ): Promise; } @@ -86,7 +86,7 @@ type ExpanderFunction = (start: number, count: number) => Promise; export class Expander implements VariableContainer { public static SET_VALUE_ERROR = localize( "setVariable.error", - "Setting value not supported", + "Setting value not supported" ); private _expanderFunction: ExpanderFunction; @@ -99,7 +99,7 @@ export class Expander implements VariableContainer { session: NodeDebugSession, filter: string, start: number, - count: number, + count: number ): Promise { return this._expanderFunction(start, count); } @@ -107,7 +107,7 @@ export class Expander implements VariableContainer { public SetValue( session: NodeDebugSession, name: string, - value: string, + value: string ): Promise { return Promise.reject(new Error(Expander.SET_VALUE_ERROR)); } @@ -121,7 +121,7 @@ export class PropertyContainer implements VariableContainer { public constructor( evalName: string | undefined, obj: V8Object, - ths?: V8Object, + ths?: V8Object ) { this._evalName = evalName; this._object = obj; @@ -132,7 +132,7 @@ export class PropertyContainer implements VariableContainer { session: NodeDebugSession, filter: FilterType, start: number, - count: number, + count: number ): Promise { if (filter === "named") { return session @@ -159,7 +159,7 @@ export class PropertyContainer implements VariableContainer { this._object, "indexed", start, - count, + count ); } else { return session @@ -184,7 +184,7 @@ export class PropertyContainer implements VariableContainer { public SetValue( session: NodeDebugSession, name: string, - value: string, + value: string ): Promise { return session._setPropertyValue(this._object.handle, name, value); } @@ -203,12 +203,12 @@ export class SetMapContainer implements VariableContainer { session: NodeDebugSession, filter: FilterType, start: number, - count: number, + count: number ): Promise { if (filter === "named") { return session._createSetMapProperties( this._evalName, - this._object, + this._object ); } @@ -222,7 +222,7 @@ export class SetMapContainer implements VariableContainer { public SetValue( session: NodeDebugSession, name: string, - value: string, + value: string ): Promise { return Promise.reject(new Error(Expander.SET_VALUE_ERROR)); } @@ -245,7 +245,7 @@ export class ScopeContainer implements VariableContainer { session: NodeDebugSession, filter: FilterType, start: number, - count: number, + count: number ): Promise { return session ._createProperties("", this._object, filter) @@ -268,7 +268,7 @@ export class ScopeContainer implements VariableContainer { public SetValue( session: NodeDebugSession, name: string, - value: string, + value: string ): Promise { return session._setVariableValue(this._frame, this._scope, name, value); } @@ -309,7 +309,7 @@ class InternalSourceBreakpoint { column: number = 0, condition?: string, logMessage?: string, - hitter?: HitterFunction, + hitter?: HitterFunction ) { this.line = this.orgLine = line; this.column = this.orgColumn = column; @@ -547,7 +547,7 @@ export class NodeDebugSession extends LoggingDebugSession { if (this._refCache.size !== oldSize) { this.log( "rc", - `NodeV8Protocol hook: ref cache size: ${this._refCache.size}`, + `NodeV8Protocol hook: ref cache size: ${this._refCache.size}` ); } } @@ -609,7 +609,7 @@ export class NodeDebugSession extends LoggingDebugSession { typeof eventBody.sourceColumn === "number" ) { let source = eventBody.sourceLineText.substr( - eventBody.sourceColumn, + eventBody.sourceColumn ); if (source.indexOf("reject(") === 0) { if (this._skipRejects && !this._catchRejects) { @@ -618,18 +618,18 @@ export class NodeDebugSession extends LoggingDebugSession { } description = localize( "exception.paused.promise.rejection", - "Paused on Promise Rejection", + "Paused on Promise Rejection" ); if (eventBody.exception.text) { eventBody.exception.text = localize( "exception.promise.rejection.text", "Promise Rejection ({0})", - eventBody.exception.text, + eventBody.exception.text ); } else { eventBody.exception.text = localize( "exception.promise.rejection", - "Promise Rejection", + "Promise Rejection" ); } } @@ -640,7 +640,7 @@ export class NodeDebugSession extends LoggingDebugSession { this._sendStoppedEvent( "exception", description, - eventBody.exception.text, + eventBody.exception.text ); } @@ -660,13 +660,13 @@ export class NodeDebugSession extends LoggingDebugSession { this.log( "la", - "_handleNodeBreakEvent: suppressed stop-on-entry event", + "_handleNodeBreakEvent: suppressed stop-on-entry event" ); // do not send event now this._rememberEntryLocation( eventBody.script.name, eventBody.sourceLine, - eventBody.sourceColumn, + eventBody.sourceColumn ); return; } @@ -681,7 +681,7 @@ export class NodeDebugSession extends LoggingDebugSession { typeof eventBody.sourceColumn === "number" ) { let source = eventBody.sourceLineText.substr( - eventBody.sourceColumn, + eventBody.sourceColumn ); if (source.indexOf("debugger") === 0) { this._gotDebuggerEvent = true; @@ -732,12 +732,12 @@ export class NodeDebugSession extends LoggingDebugSession { private _sendStoppedEvent( reason: ReasonType, description?: string, - exception_text?: string, + exception_text?: string ): void { if (this._smartStepCount > 0) { this.log( "ss", - `_handleNodeBreakEvent: ${this._smartStepCount} steps skipped`, + `_handleNodeBreakEvent: ${this._smartStepCount} steps skipped` ); this._smartStepCount = 0; } @@ -745,7 +745,7 @@ export class NodeDebugSession extends LoggingDebugSession { const e = new StoppedEvent( reason, NodeDebugSession.DUMMY_THREAD_ID, - exception_text, + exception_text ); if (!description) { @@ -753,43 +753,43 @@ export class NodeDebugSession extends LoggingDebugSession { case "step": description = localize( "reason.description.step", - "Paused on step", + "Paused on step" ); break; case "breakpoint": description = localize( "reason.description.breakpoint", - "Paused on breakpoint", + "Paused on breakpoint" ); break; case "exception": description = localize( "reason.description.exception", - "Paused on exception", + "Paused on exception" ); break; case "pause": description = localize( "reason.description.user_request", - "Paused on user request", + "Paused on user request" ); break; case "entry": description = localize( "reason.description.entry", - "Paused on entry", + "Paused on entry" ); break; case "debugger_statement": description = localize( "reason.description.debugger_statement", - "Paused on debugger statement", + "Paused on debugger statement" ); break; case "frame_entry": description = localize( "reason.description.restart", - "Paused on frame entry", + "Paused on frame entry" ); break; } @@ -854,7 +854,7 @@ export class NodeDebugSession extends LoggingDebugSession { private toggleSkippingResource( response: DebugProtocol.Response, - resource: string, + resource: string ) { resource = decodeURI(URL.parse(resource).pathname); if (this.isSkipped(resource)) { @@ -907,13 +907,13 @@ export class NodeDebugSession extends LoggingDebugSession { const src = new Source( Path.basename(path), path, - this._getScriptIdHandle(script.id), + this._getScriptIdHandle(script.id) ); if (this._sourceMaps) { return this._sourceMaps.AllSources(path).then((sources) => { if (sources && sources.length > 0) { (src).sources = sources.map( - (s) => new Source(Path.basename(s), s), + (s) => new Source(Path.basename(s), s) ); } return src; @@ -971,7 +971,7 @@ export class NodeDebugSession extends LoggingDebugSession { protected initializeRequest( response: DebugProtocol.InitializeResponse, - args: DebugProtocol.InitializeRequestArguments, + args: DebugProtocol.InitializeRequestArguments ): void { this.log("la", `initializeRequest: adapterID: ${args.adapterID}`); @@ -1052,7 +1052,7 @@ export class NodeDebugSession extends LoggingDebugSession { protected launchRequest( response: DebugProtocol.LaunchResponse, - args: LaunchRequestArguments, + args: LaunchRequestArguments ): void { if (this._processCommonArgs(response, args)) { return; @@ -1064,7 +1064,7 @@ export class NodeDebugSession extends LoggingDebugSession { args, args.__restart.port, undefined, - args.timeout, + args.timeout ); return; } @@ -1085,8 +1085,8 @@ export class NodeDebugSession extends LoggingDebugSession { localize( "VSND2028", "Unknown console type '{0}'.", - args.console, - ), + args.console + ) ); return; } @@ -1104,8 +1104,8 @@ export class NodeDebugSession extends LoggingDebugSession { 2007, localize( "attribute.wls.not.exist", - "Cannot find Windows Subsystem Linux installation", - ), + "Cannot find Windows Subsystem Linux installation" + ) ); return; } @@ -1125,9 +1125,9 @@ export class NodeDebugSession extends LoggingDebugSession { localize( "VSND2001", "Cannot find runtime '{0}' on PATH. Make sure to have '{0}' installed.", - "{_runtime}", + "{_runtime}" ), - { _runtime: runtimeExecutable }, + { _runtime: runtimeExecutable } ); return; } @@ -1135,13 +1135,13 @@ export class NodeDebugSession extends LoggingDebugSession { } else { const re = PathUtils.findExecutable( runtimeExecutable, - args.env, + args.env ); if (!re) { this.sendNotExistErrorResponse( response, "runtimeExecutable", - runtimeExecutable, + runtimeExecutable ); return; } @@ -1156,9 +1156,9 @@ export class NodeDebugSession extends LoggingDebugSession { localize( "VSND2001", "Cannot find runtime '{0}' on PATH. Make sure to have '{0}' installed.", - "{_runtime}", + "{_runtime}" ), - { _runtime: NodeDebugSession.NODE }, + { _runtime: NodeDebugSession.NODE } ); return; } @@ -1174,7 +1174,7 @@ export class NodeDebugSession extends LoggingDebugSession { this.sendRelativePathErrorResponse( response, "program", - programPath, + programPath ); return; } @@ -1183,7 +1183,7 @@ export class NodeDebugSession extends LoggingDebugSession { this.sendNotExistErrorResponse( response, "program", - programPath, + programPath ); return; } @@ -1197,8 +1197,8 @@ export class NodeDebugSession extends LoggingDebugSession { this.outLine( localize( "program.path.case.mismatch.warning", - "Program path uses differently cased character as file on disk; this might result in breakpoints not being hit.", - ), + "Program path uses differently cased character as file on disk; this might result in breakpoints not being hit." + ) ); } } @@ -1224,13 +1224,13 @@ export class NodeDebugSession extends LoggingDebugSession { // programPath must be source because there seems to be a generated file for it this.log( "sm", - `launchRequest: program '${programPath}' seems to be the source; launch the generated file '${generatedPath}' instead`, + `launchRequest: program '${programPath}' seems to be the source; launch the generated file '${generatedPath}' instead` ); programPath = generatedPath; } else { this.log( "sm", - `launchRequest: program '${programPath}' seems to be the generated file`, + `launchRequest: program '${programPath}' seems to be the generated file` ); } this.launchRequest2( @@ -1239,7 +1239,7 @@ export class NodeDebugSession extends LoggingDebugSession { programPath, programArgs, runtimeExecutable, - runtimeArgs, + runtimeArgs ); }); return; @@ -1253,9 +1253,9 @@ export class NodeDebugSession extends LoggingDebugSession { localize( "VSND2002", "Cannot launch program '{0}'; configuring source maps might help.", - "{path}", + "{path}" ), - { path: programPath }, + { path: programPath } ); return; } @@ -1271,9 +1271,9 @@ export class NodeDebugSession extends LoggingDebugSession { localize( "VSND2009", "Cannot launch program '{0}' because corresponding JavaScript cannot be found.", - "{path}", + "{path}" ), - { path: programPath }, + { path: programPath } ); } else { this.sendErrorResponse( @@ -1283,16 +1283,16 @@ export class NodeDebugSession extends LoggingDebugSession { "VSND2003", "Cannot launch program '{0}'; setting the '{1}' attribute might help.", "{path}", - "outFiles", + "outFiles" ), - { path: programPath }, + { path: programPath } ); } return; } this.log( "sm", - `launchRequest: program '${programPath}' seems to be the source; launch the generated file '${generatedPath}' instead`, + `launchRequest: program '${programPath}' seems to be the source; launch the generated file '${generatedPath}' instead` ); programPath = generatedPath; this.launchRequest2( @@ -1301,7 +1301,7 @@ export class NodeDebugSession extends LoggingDebugSession { programPath, programArgs, runtimeExecutable, - runtimeArgs, + runtimeArgs ); }); return; @@ -1314,7 +1314,7 @@ export class NodeDebugSession extends LoggingDebugSession { programPath, programArgs, runtimeExecutable, - runtimeArgs, + runtimeArgs ); } @@ -1324,7 +1324,7 @@ export class NodeDebugSession extends LoggingDebugSession { programPath: string, programArgs: string[], runtimeExecutable: string, - runtimeArgs: string[], + runtimeArgs: string[] ): Promise { let program: string | undefined; let workingDirectory = args.cwd; @@ -1334,7 +1334,7 @@ export class NodeDebugSession extends LoggingDebugSession { this.sendRelativePathErrorResponse( response, "cwd", - workingDirectory, + workingDirectory ); return; } @@ -1342,7 +1342,7 @@ export class NodeDebugSession extends LoggingDebugSession { this.sendNotExistErrorResponse( response, "cwd", - workingDirectory, + workingDirectory ); return; } @@ -1392,7 +1392,7 @@ export class NodeDebugSession extends LoggingDebugSession { if (args.envFile) { try { const buffer = PathUtils.stripBOM( - FS.readFileSync(args.envFile, "utf8"), + FS.readFileSync(args.envFile, "utf8") ); const env = {}; buffer.split("\n").forEach((line) => { @@ -1421,9 +1421,9 @@ export class NodeDebugSession extends LoggingDebugSession { localize( "VSND2029", "Can't load environment variables from file ({0}).", - "{_error}", + "{_error}" ), - { _error: e.message }, + { _error: e.message } ); return; } @@ -1436,7 +1436,7 @@ export class NodeDebugSession extends LoggingDebugSession { workingDirectory, launchArgs[0], launchArgs.slice(1), - program, + program ); // workaround for #35249 // if using subsystem linux, we use local/remote mapping (if not configured by user) @@ -1484,7 +1484,7 @@ export class NodeDebugSession extends LoggingDebugSession { args, port, address, - timeout, + timeout ); } } else { @@ -1494,15 +1494,15 @@ export class NodeDebugSession extends LoggingDebugSession { localize( "VSND2011", "Cannot launch debug target in terminal ({0}).", - "{_error}", + "{_error}" ), - { _error: runResponse.message }, + { _error: runResponse.message } ); this._terminated( - "terminal error: " + runResponse.message, + "terminal error: " + runResponse.message ); } - }, + } ); } else { this._sendLaunchCommandToConsole(launchArgs); @@ -1510,7 +1510,7 @@ export class NodeDebugSession extends LoggingDebugSession { // merge environment variables into a copy of the process.env envVars = PathUtils.extendObject( PathUtils.extendObject({}, process.env), - envVars, + envVars ); // delete all variables that have a 'null' value @@ -1554,7 +1554,7 @@ export class NodeDebugSession extends LoggingDebugSession { const nodeProcess = CP.spawn( wslLaunchArgs.executable, wslLaunchArgs.args, - options, + options ); nodeProcess.on("error", (error) => { // tslint:disable-next-line:no-bitwise @@ -1564,10 +1564,10 @@ export class NodeDebugSession extends LoggingDebugSession { localize( "VSND2017", "Cannot launch debug target ({0}).", - "{_error}", + "{_error}" ), { _error: error.message }, - ErrorDestination.Telemetry | ErrorDestination.User, + ErrorDestination.Telemetry | ErrorDestination.User ); this._terminated(`failed to launch target (${error})`); }); @@ -1622,7 +1622,7 @@ export class NodeDebugSession extends LoggingDebugSession { */ private _processCommonArgs( response: DebugProtocol.Response, - args: CommonArguments, + args: CommonArguments ): boolean { let stopLogging = true; if (typeof args.trace === "boolean") { @@ -1671,7 +1671,7 @@ export class NodeDebugSession extends LoggingDebugSession { this.sendRelativePathErrorResponse( response, "localRoot", - localRoot, + localRoot ); return true; } @@ -1679,7 +1679,7 @@ export class NodeDebugSession extends LoggingDebugSession { this.sendNotExistErrorResponse( response, "localRoot", - localRoot, + localRoot ); return true; } @@ -1698,7 +1698,7 @@ export class NodeDebugSession extends LoggingDebugSession { this.sendRelativePathErrorResponse( response, "outDir", - generatedCodeDirectory, + generatedCodeDirectory ); return true; } @@ -1706,7 +1706,7 @@ export class NodeDebugSession extends LoggingDebugSession { this.sendNotExistErrorResponse( response, "outDir", - generatedCodeDirectory, + generatedCodeDirectory ); return true; } @@ -1714,7 +1714,7 @@ export class NodeDebugSession extends LoggingDebugSession { this._sourceMaps = new SourceMaps( this, generatedCodeDirectory, - args.outFiles, + args.outFiles ); } } @@ -1726,7 +1726,7 @@ export class NodeDebugSession extends LoggingDebugSession { protected attachRequest( response: DebugProtocol.AttachResponse, - args: AttachRequestArguments, + args: AttachRequestArguments ): void { if (this._processCommonArgs(response, args)) { return; @@ -1745,7 +1745,7 @@ export class NodeDebugSession extends LoggingDebugSession { args: CommonArguments, port: number, adr: string | undefined, - timeout: number | undefined, + timeout: number | undefined ): void { if (!port) { port = 5858; @@ -1790,7 +1790,7 @@ export class NodeDebugSession extends LoggingDebugSession { this.sendEvent( new CapabilitiesEvent({ supportsStepBack: true, - }), + }) ); } } @@ -1815,9 +1815,9 @@ export class NodeDebugSession extends LoggingDebugSession { localize( "VSND2010", "Cannot connect to runtime process (reason: {0}).", - "{_error}", + "{_error}" ), - { _error: err.message }, + { _error: err.message } ); } else { // we are not yet connected so retry a few times @@ -1838,8 +1838,8 @@ export class NodeDebugSession extends LoggingDebugSession { 2033, localize( "VSND2033", - "Cannot connect to runtime; make sure that runtime is in 'legacy' debug mode.", - ), + "Cannot connect to runtime; make sure that runtime is in 'legacy' debug mode." + ) ); } else { this.sendErrorResponse( @@ -1847,8 +1847,8 @@ export class NodeDebugSession extends LoggingDebugSession { 2034, localize( "VSND2034", - "Cannot connect to runtime via 'legacy' protocol; try to use 'inspector' protocol.", - ), + "Cannot connect to runtime via 'legacy' protocol; try to use 'inspector' protocol." + ) ); } } @@ -1859,9 +1859,9 @@ export class NodeDebugSession extends LoggingDebugSession { localize( "VSND2010", "Cannot connect to runtime process (reason: {0}).", - "{_error}", + "{_error}" ), - { _error: err.message }, + { _error: err.message } ); } } @@ -1886,7 +1886,7 @@ export class NodeDebugSession extends LoggingDebugSession { private _isRunningWithRetry( retryCount: number, completeDispatch: (value: boolean) => void, - errorDispatch: (error: V8EvaluateResponse) => void, + errorDispatch: (error: V8EvaluateResponse) => void ): void { this._node.command( "evaluate", @@ -1896,14 +1896,14 @@ export class NodeDebugSession extends LoggingDebugSession { this._nodeProcessId = +resp.body.value; this.log( "la", - `__initialize: got process id ${this._nodeProcessId} from node`, + `__initialize: got process id ${this._nodeProcessId} from node` ); this.logNodeVersion(); } else { if (resp.message.indexOf("process is not defined") >= 0) { this.log( "la", - "__initialize: process not defined error; got no pid", + "__initialize: process not defined error; got no pid" ); resp.success = true; // continue and try to get process.pid later } @@ -1914,7 +1914,7 @@ export class NodeDebugSession extends LoggingDebugSession { } else { this.log( "la", - "__initialize: retrieving process id from node failed", + "__initialize: retrieving process id from node failed" ); if (retryCount < 4) { @@ -1923,7 +1923,7 @@ export class NodeDebugSession extends LoggingDebugSession { this._isRunningWithRetry( retryCount + 1, completeDispatch, - errorDispatch, + errorDispatch ); }, 100); return; @@ -1931,7 +1931,7 @@ export class NodeDebugSession extends LoggingDebugSession { errorDispatch(resp); } } - }, + } ); } @@ -1950,14 +1950,14 @@ export class NodeDebugSession extends LoggingDebugSession { this.sendEvent( new OutputEvent("nodeVersion", "telemetry", { version, - }), + }) ); this.log( "la", - `_initialize: target node version: ${version}`, + `_initialize: target node version: ${version}` ); } - }, + } ); } @@ -1992,7 +1992,7 @@ export class NodeDebugSession extends LoggingDebugSession { try { const contents = FS.readFileSync( Path.join(__dirname, NodeDebugSession.DEBUG_INJECTION), - "utf8", + "utf8" ); const args = { @@ -2006,7 +2006,7 @@ export class NodeDebugSession extends LoggingDebugSession { .then((resp) => { this.log( "la", - `_injectDebuggerExtensions: code injection successful`, + `_injectDebuggerExtensions: code injection successful` ); this._nodeInjectionAvailable = true; return true; @@ -2014,7 +2014,7 @@ export class NodeDebugSession extends LoggingDebugSession { .catch((resp) => { this.log( "la", - `_injectDebuggerExtensions: code injection failed with error '${resp.message}'`, + `_injectDebuggerExtensions: code injection failed with error '${resp.message}'` ); return true; }); @@ -2051,7 +2051,7 @@ export class NodeDebugSession extends LoggingDebugSession { if (this._gotEntryEvent) { this.log( "la", - `_startInitialize: got break on entry event after ${n} retries`, + `_startInitialize: got break on entry event after ${n} retries` ); if (this._nodeProcessId <= 0) { // if we haven't gotten a process pid so far, we try it again @@ -2063,12 +2063,12 @@ export class NodeDebugSession extends LoggingDebugSession { this._nodeProcessId = +resp.body.value; this.log( "la", - `_initialize: got process id ${this._nodeProcessId} from node (2nd try)`, + `_initialize: got process id ${this._nodeProcessId} from node (2nd try)` ); this.logNodeVersion(); } this._startInitialize2(stopped); - }, + } ); } else { this._startInitialize2(stopped); @@ -2076,7 +2076,7 @@ export class NodeDebugSession extends LoggingDebugSession { } else { this.log( "la", - `_startInitialize: no entry event after ${n} retries; giving up`, + `_startInitialize: no entry event after ${n} retries; giving up` ); this._gotEntryEvent = true; // we pretend to got one so that no 'entry' event will show up later... @@ -2089,7 +2089,7 @@ export class NodeDebugSession extends LoggingDebugSession { this._rememberEntryLocation( s.name, resp.body.line, - resp.body.column, + resp.body.column ); } @@ -2110,7 +2110,7 @@ export class NodeDebugSession extends LoggingDebugSession { if (this._attachMode) { this.log( "la", - `_startInitialize2: in attach mode we guess stopOnEntry flag to be '${stopped}''`, + `_startInitialize2: in attach mode we guess stopOnEntry flag to be '${stopped}''` ); if (this._stopOnEntry === undefined) { this._stopOnEntry = stopped; @@ -2128,7 +2128,7 @@ export class NodeDebugSession extends LoggingDebugSession { } else { this.log( "la", - `_startInitialize2: remember to do a 'Continue' later`, + `_startInitialize2: remember to do a 'Continue' later` ); this._needContinue = true; } @@ -2139,7 +2139,7 @@ export class NodeDebugSession extends LoggingDebugSession { protected terminateRequest( response: DebugProtocol.TerminateResponse, - args: DebugProtocol.TerminateArguments, + args: DebugProtocol.TerminateArguments ): void { if (!this._isWSL && this._nodeProcessId > 0) { process.kill(this._nodeProcessId, "SIGINT"); @@ -2151,7 +2151,7 @@ export class NodeDebugSession extends LoggingDebugSession { protected disconnectRequest( response: DebugProtocol.DisconnectResponse, - args: DebugProtocol.DisconnectArguments, + args: DebugProtocol.DisconnectArguments ): void { this.shutdown(); @@ -2221,13 +2221,13 @@ export class NodeDebugSession extends LoggingDebugSession { protected setBreakPointsRequest( response: DebugProtocol.SetBreakpointsResponse, - args: DebugProtocol.SetBreakpointsArguments, + args: DebugProtocol.SetBreakpointsArguments ): void { this.log( "bp", `setBreakPointsRequest: ${JSON.stringify( - args.source, - )} ${JSON.stringify(args.breakpoints)}`, + args.source + )} ${JSON.stringify(args.breakpoints)}` ); const sbs = new Array(); @@ -2237,7 +2237,7 @@ export class NodeDebugSession extends LoggingDebugSession { let hitter: HitterFunction | undefined; if (b.hitCondition) { const result = NodeDebugSession.HITCOUNT_MATCHER.exec( - b.hitCondition.trim(), + b.hitCondition.trim() ); if (result && result.length >= 3) { let op = result[1] || ">="; @@ -2263,8 +2263,8 @@ export class NodeDebugSession extends LoggingDebugSession { : 0, b.condition, b.logMessage, - hitter, - ), + hitter + ) ); } } else if (args.lines) { @@ -2272,8 +2272,8 @@ export class NodeDebugSession extends LoggingDebugSession { for (let l of args.lines) { sbs.push( new InternalSourceBreakpoint( - this.convertClientLineToDebugger(l), - ), + this.convertClientLineToDebugger(l) + ) ); } } @@ -2303,7 +2303,7 @@ export class NodeDebugSession extends LoggingDebugSession { if (keepUnverified) { const message = localize( "file.on.disk.changed", - "Unverified because file on disk has changed. Please restart debug session.", + "Unverified because file on disk has changed. Please restart debug session." ); for (let ibp of sbs) { ibp.verificationMessage = message; @@ -2317,7 +2317,7 @@ export class NodeDebugSession extends LoggingDebugSession { this._mapSourceAndUpdateBreakpoints( response, source.adapterData.inlinePath, - sbs, + sbs ); return; } @@ -2328,7 +2328,7 @@ export class NodeDebugSession extends LoggingDebugSession { response, source.adapterData.remotePath, -1, - sbs, + sbs ); return; } @@ -2350,12 +2350,12 @@ export class NodeDebugSession extends LoggingDebugSession { localize( "VSND2019", "Internal module {0} not found.", - "{_module}", + "{_module}" ), - { _module: sourcePath }, + { _module: sourcePath } ); } - }, + } ); return; } @@ -2370,7 +2370,7 @@ export class NodeDebugSession extends LoggingDebugSession { response, null, srcSource.scriptId, - sbs, + sbs ); return; } @@ -2386,14 +2386,14 @@ export class NodeDebugSession extends LoggingDebugSession { 2012, "No valid source specified.", null, - ErrorDestination.Telemetry, + ErrorDestination.Telemetry ); } private _mapSourceAndUpdateBreakpoints( response: DebugProtocol.SetBreakpointsResponse, path: string, - lbs: InternalSourceBreakpoint[], + lbs: InternalSourceBreakpoint[] ): void { let generated = ""; @@ -2412,7 +2412,7 @@ export class NodeDebugSession extends LoggingDebugSession { // if generated and source are the same we don't need a sourcemap this.log( "bp", - `_mapSourceAndUpdateBreakpoints: source and generated are same -> ignore sourcemap`, + `_mapSourceAndUpdateBreakpoints: source and generated are same -> ignore sourcemap` ); generated = ""; } @@ -2424,9 +2424,9 @@ export class NodeDebugSession extends LoggingDebugSession { this._sourceMaps.MapFromSource( path, lbrkpt.line, - lbrkpt.column, - ), - ), + lbrkpt.column + ) + ) ).then((mapResults) => { for (let i = 0; i < lbs.length; i++) { const lb = lbs[i]; @@ -2434,7 +2434,7 @@ export class NodeDebugSession extends LoggingDebugSession { if (mapresult) { this.log( "sm", - `_mapSourceAndUpdateBreakpoints: src: '${path}' ${lb.line}:${lb.column} -> gen: '${mapresult.path}' ${mapresult.line}:${mapresult.column}`, + `_mapSourceAndUpdateBreakpoints: src: '${path}' ${lb.line}:${lb.column} -> gen: '${mapresult.path}' ${mapresult.line}:${mapresult.column}` ); if (mapresult.path !== generated) { // this source line maps to a different destination file -> this is not supported, ignore breakpoint by setting line to -1 @@ -2446,7 +2446,7 @@ export class NodeDebugSession extends LoggingDebugSession { } else { this.log( "sm", - `_mapSourceAndUpdateBreakpoints: src: '${path}' ${lb.line}:${lb.column} -> gen: couldn't be mapped; breakpoint ignored`, + `_mapSourceAndUpdateBreakpoints: src: '${path}' ${lb.line}:${lb.column} -> gen: couldn't be mapped; breakpoint ignored` ); lb.line = -1; } @@ -2483,7 +2483,7 @@ export class NodeDebugSession extends LoggingDebugSession { path: string | null, scriptId: number, lbs: InternalSourceBreakpoint[], - sourcemap = false, + sourcemap = false ): void { // clear all existing breakpoints for the given path or script ID this._node @@ -2514,8 +2514,8 @@ export class NodeDebugSession extends LoggingDebugSession { .then(() => { return Promise.all( lbs.map((bp) => - this._setBreakpoint(scriptId, path, bp, sourcemap), - ), + this._setBreakpoint(scriptId, path, bp, sourcemap) + ) ); }) .then((result) => { @@ -2525,7 +2525,7 @@ export class NodeDebugSession extends LoggingDebugSession { this.sendResponse(response); this.log( "bp", - `_updateBreakpoints: result ${JSON.stringify(result)}`, + `_updateBreakpoints: result ${JSON.stringify(result)}` ); }) .catch((nodeResponse) => { @@ -2538,7 +2538,7 @@ export class NodeDebugSession extends LoggingDebugSession { */ private _clearBreakpoints(ids: Array): Promise { return Promise.all( - ids.map((id) => this._node.clearBreakpoint({ breakpoint: id })), + ids.map((id) => this._node.clearBreakpoint({ breakpoint: id })) ) .then((response) => { return; @@ -2555,14 +2555,14 @@ export class NodeDebugSession extends LoggingDebugSession { scriptId: number, path: string | null, lb: InternalSourceBreakpoint, - sourcemap: boolean, + sourcemap: boolean ): Promise { if (lb.line < 0) { // ignore this breakpoint because it couldn't be source mapped successfully const bp: DebugProtocol.Breakpoint = new Breakpoint(false); bp.message = localize( "sourcemapping.fail.message", - "Breakpoint ignored because generated code not found (source map problem?).", + "Breakpoint ignored because generated code not found (source map problem?)." ); return Promise.resolve(bp); } @@ -2628,13 +2628,13 @@ export class NodeDebugSession extends LoggingDebugSession { localpath, null, actualLine, - actualColumn, + actualColumn ) .then((mapresult) => { if (mapresult) { this.log( "sm", - `_setBreakpoint: bp verification gen: '${localpath}' ${actualLine}:${actualColumn} -> src: '${mapresult.path}' ${mapresult.line}:${mapresult.column}`, + `_setBreakpoint: bp verification gen: '${localpath}' ${actualLine}:${actualColumn} -> src: '${mapresult.path}' ${mapresult.line}:${mapresult.column}` ); actualSrcLine = mapresult.line; actualSrcColumn = mapresult.column; @@ -2649,7 +2649,7 @@ export class NodeDebugSession extends LoggingDebugSession { actualSrcLine, actualSrcColumn, actualLine, - actualColumn, + actualColumn ); }); } else { @@ -2664,7 +2664,7 @@ export class NodeDebugSession extends LoggingDebugSession { actualSrcLine, actualSrcColumn, actualLine, - actualColumn, + actualColumn ); }) .catch((error) => { @@ -2678,7 +2678,7 @@ export class NodeDebugSession extends LoggingDebugSession { actualSrcLine: number, actualSrcColumn: number, actualLine: number, - actualColumn: number, + actualColumn: number ): Promise { // nasty corner case: since we ignore the break-on-entry event we have to make sure that we // stop in the entry point line if the user has an explicit breakpoint there (or if there is a 'debugger' statement). @@ -2705,7 +2705,7 @@ export class NodeDebugSession extends LoggingDebugSession { this._needBreakpointEvent = true; this.log( "la", - "_setBreakpoint2: remember to fire a breakpoint event later", + "_setBreakpoint2: remember to fire a breakpoint event later" ); } } @@ -2714,7 +2714,7 @@ export class NodeDebugSession extends LoggingDebugSession { const bp: DebugProtocol.Breakpoint = new Breakpoint( false, this.convertDebuggerLineToClient(actualSrcLine), - this.convertDebuggerColumnToClient(actualSrcColumn), + this.convertDebuggerColumnToClient(actualSrcColumn) ); bp.message = ibp.verificationMessage; return bp; @@ -2722,7 +2722,7 @@ export class NodeDebugSession extends LoggingDebugSession { return new Breakpoint( true, this.convertDebuggerLineToClient(actualSrcLine), - this.convertDebuggerColumnToClient(actualSrcColumn), + this.convertDebuggerColumnToClient(actualSrcColumn) ); } } @@ -2786,7 +2786,7 @@ export class NodeDebugSession extends LoggingDebugSession { protected setFunctionBreakPointsRequest( response: DebugProtocol.SetFunctionBreakpointsResponse, - args: DebugProtocol.SetFunctionBreakpointsArguments, + args: DebugProtocol.SetFunctionBreakpointsArguments ): void { // clear all existing function breakpoints this._clearBreakpoints(this._functionBreakpoints) @@ -2796,8 +2796,8 @@ export class NodeDebugSession extends LoggingDebugSession { // set new function breakpoints return Promise.all( args.breakpoints.map((functionBreakpoint) => - this._setFunctionBreakpoint(functionBreakpoint), - ), + this._setFunctionBreakpoint(functionBreakpoint) + ) ); }) .then((results) => { @@ -2809,8 +2809,8 @@ export class NodeDebugSession extends LoggingDebugSession { this.log( "bp", `setFunctionBreakPointsRequest: result ${JSON.stringify( - results, - )}`, + results + )}` ); }) .catch((nodeResponse) => { @@ -2823,7 +2823,7 @@ export class NodeDebugSession extends LoggingDebugSession { * Returns verification info about the breakpoint. */ private _setFunctionBreakpoint( - functionBreakpoint: DebugProtocol.FunctionBreakpoint, + functionBreakpoint: DebugProtocol.FunctionBreakpoint ): Promise { let args: V8SetBreakpointArgs = { type: "function", @@ -2840,10 +2840,10 @@ export class NodeDebugSession extends LoggingDebugSession { const locations = resp.body.actual_locations; if (locations && locations.length > 0) { const actualLine = this.convertDebuggerLineToClient( - locations[0].line, + locations[0].line ); const actualColumn = this.convertDebuggerColumnToClient( - this._adjustColumn(actualLine, locations[0].column), + this._adjustColumn(actualLine, locations[0].column) ); return new Breakpoint(true, actualLine, actualColumn); // TODO@AW add source } else { @@ -2862,11 +2862,11 @@ export class NodeDebugSession extends LoggingDebugSession { protected setExceptionBreakPointsRequest( response: DebugProtocol.SetExceptionBreakpointsResponse, - args: DebugProtocol.SetExceptionBreakpointsArguments, + args: DebugProtocol.SetExceptionBreakpointsArguments ): void { this.log( "bp", - `setExceptionBreakPointsRequest: ${JSON.stringify(args.filters)}`, + `setExceptionBreakPointsRequest: ${JSON.stringify(args.filters)}` ); let all = false; @@ -2896,7 +2896,7 @@ export class NodeDebugSession extends LoggingDebugSession { 2024, "Configuring exception break options failed ({_nodeError}).", { _nodeError: err.message }, - ErrorDestination.Telemetry, + ErrorDestination.Telemetry ); }); } @@ -2905,7 +2905,7 @@ export class NodeDebugSession extends LoggingDebugSession { protected configurationDoneRequest( response: DebugProtocol.ConfigurationDoneResponse, - args: DebugProtocol.ConfigurationDoneArguments, + args: DebugProtocol.ConfigurationDoneArguments ): void { // all breakpoints are configured now -> start debugging @@ -2964,7 +2964,7 @@ export class NodeDebugSession extends LoggingDebugSession { name = `${name} (${this._node.hostVersion})`; } threads.push( - new Thread(NodeDebugSession.DUMMY_THREAD_ID, name), + new Thread(NodeDebugSession.DUMMY_THREAD_ID, name) ); } response.body = { @@ -2978,7 +2978,7 @@ export class NodeDebugSession extends LoggingDebugSession { protected stackTraceRequest( response: DebugProtocol.StackTraceResponse, - args: DebugProtocol.StackTraceArguments, + args: DebugProtocol.StackTraceArguments ): void { const threadReference = args.threadId; const startFrame = @@ -2993,7 +2993,7 @@ export class NodeDebugSession extends LoggingDebugSession { 2014, "Unexpected thread reference {_thread}.", { _thread: threadReference }, - ErrorDestination.Telemetry, + ErrorDestination.Telemetry ); return; } @@ -3005,7 +3005,7 @@ export class NodeDebugSession extends LoggingDebugSession { this.log( "va", - `stackTraceRequest: backtrace ${startFrame} ${maxLevels}`, + `stackTraceRequest: backtrace ${startFrame} ${maxLevels}` ); this._node .backtrace(backtraceArgs) @@ -3014,7 +3014,7 @@ export class NodeDebugSession extends LoggingDebugSession { const frames = response.body.frames; totalFrames = response.body.totalFrames; return Promise.all( - frames.map((frame) => this._createStackFrame(frame)), + frames.map((frame) => this._createStackFrame(frame)) ); } else { throw new Error("no stack"); @@ -3035,14 +3035,14 @@ export class NodeDebugSession extends LoggingDebugSession { 2022, localize( "VSND2022", - "No call stack because program paused outside of JavaScript.", - ), + "No call stack because program paused outside of JavaScript." + ) ); } else { this.sendErrorResponse( response, 2023, - localize("VSND2023", "No call stack available."), + localize("VSND2023", "No call stack available.") ); } } else { @@ -3051,9 +3051,9 @@ export class NodeDebugSession extends LoggingDebugSession { 2018, localize( "VSND2018", - "No call stack available ({_command}: {_error}).", + "No call stack available ({_command}: {_error})." ), - { _command: error.command, _error: error.message }, + { _command: error.command, _error: error.message } ); } }); @@ -3076,7 +3076,7 @@ export class NodeDebugSession extends LoggingDebugSession { let origin = localize( "origin.from.node", - "read-only content from Node.js", + "read-only content from Node.js" ); const script_val = this._getValueFromCache(frame.script); @@ -3106,7 +3106,7 @@ export class NodeDebugSession extends LoggingDebugSession { // assume attached to remote node process origin = localize( "origin.from.remote.node", - "read-only content from remote Node.js", + "read-only content from remote Node.js" ); } @@ -3123,9 +3123,9 @@ export class NodeDebugSession extends LoggingDebugSession { remotePath, origin, line, - column, + column ); - }, + } ); } @@ -3136,7 +3136,7 @@ export class NodeDebugSession extends LoggingDebugSession { remotePath, origin, line, - column, + column ); } @@ -3144,7 +3144,7 @@ export class NodeDebugSession extends LoggingDebugSession { path = this._scriptToPath(script_val); origin = localize( "origin.core.module", - "read-only core module", + "read-only core module" ); } else { // do not map the script to a file in the workspace @@ -3170,7 +3170,7 @@ export class NodeDebugSession extends LoggingDebugSession { name, path, sourceHandle, - origin, + origin ); } @@ -3184,20 +3184,20 @@ export class NodeDebugSession extends LoggingDebugSession { path: string | undefined, sourceHandle: number = 0, origin?: string, - data?: any, + data?: any ): Source { let deemphasize = false; if (path && this.isSkipped(path)) { const skipFiles = localize( "source.skipFiles", - "skipped due to 'skipFiles'", + "skipped due to 'skipFiles'" ); deemphasize = true; origin = origin ? `${origin} (${skipFiles})` : skipFiles; } else if (!hasSource && this._smartStep && this._sourceMaps) { const smartStep = localize( "source.smartstep", - "skipped due to 'smartStep'", + "skipped due to 'smartStep'" ); deemphasize = true; origin = origin ? `${origin} (${smartStep})` : smartStep; @@ -3226,7 +3226,7 @@ export class NodeDebugSession extends LoggingDebugSession { remotePath: string, origin: string, line: number, - column: number, + column: number ): Promise { return this._sourceMaps .MapToSource(localPath, content, line, column) @@ -3234,29 +3234,27 @@ export class NodeDebugSession extends LoggingDebugSession { if (mapresult) { this.log( "sm", - `_createStackFrameFromSourceMap: gen: '${localPath}' ${line}:${column} -> src: '${mapresult.path}' ${mapresult.line}:${mapresult.column}`, + `_createStackFrameFromSourceMap: gen: '${localPath}' ${line}:${column} -> src: '${mapresult.path}' ${mapresult.line}:${mapresult.column}` ); return this._sameFile( mapresult.path, this._compareContents, 0, - mapresult.content, + mapresult.content ).then((same) => { if (same) { // use this mapping const src = this._createSource( true, mapresult.path, - this.convertDebuggerPathToClient( - mapresult.path, - ), + this.convertDebuggerPathToClient(mapresult.path) ); return this._createStackFrameFromSource( frame, src, mapresult.line, - mapresult.column, + mapresult.column ); } @@ -3264,14 +3262,14 @@ export class NodeDebugSession extends LoggingDebugSession { if (mapresult.content) { this.log( "sm", - `_createStackFrameFromSourceMap: source '${mapresult.path}' doesn't exist -> use inlined source`, + `_createStackFrameFromSourceMap: source '${mapresult.path}' doesn't exist -> use inlined source` ); const sourceHandle = this._getInlinedContentHandle( - mapresult.content, + mapresult.content ); origin = localize( "origin.inlined.source.map", - "read-only inlined content from source map", + "read-only inlined content from source map" ); const src = this._createSource( true, @@ -3279,20 +3277,20 @@ export class NodeDebugSession extends LoggingDebugSession { undefined, sourceHandle, origin, - { inlinePath: mapresult.path }, + { inlinePath: mapresult.path } ); return this._createStackFrameFromSource( frame, src, mapresult.line, - mapresult.column, + mapresult.column ); } // no source found this.log( "sm", - `_createStackFrameFromSourceMap: gen: '${localPath}' ${line}:${column} -> can't find source -> use generated file`, + `_createStackFrameFromSourceMap: gen: '${localPath}' ${line}:${column} -> can't find source -> use generated file` ); return this._createStackFrameFromPath( frame, @@ -3301,14 +3299,14 @@ export class NodeDebugSession extends LoggingDebugSession { remotePath, origin, line, - column, + column ); }); } this.log( "sm", - `_createStackFrameFromSourceMap: gen: '${localPath}' ${line}:${column} -> couldn't be mapped to source -> use generated file`, + `_createStackFrameFromSourceMap: gen: '${localPath}' ${line}:${column} -> couldn't be mapped to source -> use generated file` ); return this._createStackFrameFromPath( frame, @@ -3317,7 +3315,7 @@ export class NodeDebugSession extends LoggingDebugSession { remotePath, origin, line, - column, + column ); }); } @@ -3342,7 +3340,7 @@ export class NodeDebugSession extends LoggingDebugSession { remotePath: string, origin: string, line: number, - column: number, + column: number ): Promise { const script_val = this._getValueFromCache(frame.script); const script_id = script_val.id; @@ -3355,7 +3353,7 @@ export class NodeDebugSession extends LoggingDebugSession { src = this._createSource( false, name, - this.convertDebuggerPathToClient(localPath), + this.convertDebuggerPathToClient(localPath) ); } else { // we use the script's content streamed from node @@ -3366,16 +3364,16 @@ export class NodeDebugSession extends LoggingDebugSession { undefined, sourceHandle, origin, - { remotePath: remotePath }, + { remotePath: remotePath } ); // assume it is a remote path } return this._createStackFrameFromSource( frame, src, line, - column, + column ); - }, + } ); } @@ -3396,7 +3394,7 @@ export class NodeDebugSession extends LoggingDebugSession { frame: V8Frame, src: Source | undefined, line: number, - column: number, + column: number ): StackFrame { const name = this._getFrameName(frame); const frameReference = this._frameHandles.create(frame); @@ -3405,7 +3403,7 @@ export class NodeDebugSession extends LoggingDebugSession { name, src, this.convertDebuggerLineToClient(line), - this.convertDebuggerColumnToClient(column), + this.convertDebuggerColumnToClient(column) ); } @@ -3433,7 +3431,7 @@ export class NodeDebugSession extends LoggingDebugSession { path: string, compareContents: boolean, script_id: number, - content?: string, + content?: string ): Promise { return this._existsFile(path).then((exists) => { if (exists) { @@ -3443,8 +3441,8 @@ export class NodeDebugSession extends LoggingDebugSession { content ? Promise.resolve(content) : this._loadScript(script_id).then( - (script) => script.contents, - ), + (script) => script.contents + ), ]) .then((results) => { let fileContents = results[0]; @@ -3514,55 +3512,55 @@ export class NodeDebugSession extends LoggingDebugSession { key: "scope.global", comment: ["https://github.com/Microsoft/vscode/issues/4569"], }, - "Global", + "Global" ), localize( { key: "scope.local", comment: ["https://github.com/Microsoft/vscode/issues/4569"], }, - "Local", + "Local" ), localize( { key: "scope.with", comment: ["https://github.com/Microsoft/vscode/issues/4569"], }, - "With", + "With" ), localize( { key: "scope.closure", comment: ["https://github.com/Microsoft/vscode/issues/4569"], }, - "Closure", + "Closure" ), localize( { key: "scope.catch", comment: ["https://github.com/Microsoft/vscode/issues/4569"], }, - "Catch", + "Catch" ), localize( { key: "scope.block", comment: ["https://github.com/Microsoft/vscode/issues/4569"], }, - "Block", + "Block" ), localize( { key: "scope.script", comment: ["https://github.com/Microsoft/vscode/issues/4569"], }, - "Script", + "Script" ), ]; protected scopesRequest( response: DebugProtocol.ScopesResponse, - args: DebugProtocol.ScopesArguments, + args: DebugProtocol.ScopesArguments ): void { const frame = this._frameHandles.get(args.frameId); if (!frame) { @@ -3571,7 +3569,7 @@ export class NodeDebugSession extends LoggingDebugSession { 2020, "stack frame not valid", null, - ErrorDestination.Telemetry, + ErrorDestination.Telemetry ); return; } @@ -3621,7 +3619,7 @@ export class NodeDebugSession extends LoggingDebugSession { }, "Local ({0} of {1})", scopesArgs.maxLocals, - scopesResponse.body.vscode_locals, + scopesResponse.body.vscode_locals ); } else { scopeName = NodeDebugSession.SCOPE_NAMES[type]; @@ -3630,7 +3628,7 @@ export class NodeDebugSession extends LoggingDebugSession { scopeName = localize( "scope.unknown", "Unknown Scope Type: {0}", - type, + type ); } @@ -3641,9 +3639,9 @@ export class NodeDebugSession extends LoggingDebugSession { return new Scope( scopeName, this._variableHandles.create( - new ScopeContainer(scope, x, extra), + new ScopeContainer(scope, x, extra) ), - expensive, + expensive ); } return new Scope(scopeName, 0); @@ -3651,7 +3649,7 @@ export class NodeDebugSession extends LoggingDebugSession { .catch((error) => { return new Scope(scopeName, 0); }); - }), + }) ); }) .then((scopes) => { @@ -3664,7 +3662,7 @@ export class NodeDebugSession extends LoggingDebugSession { "https://github.com/Microsoft/vscode/issues/4569", ], }, - "Exception", + "Exception" ); scopes.unshift( new Scope( @@ -3672,10 +3670,10 @@ export class NodeDebugSession extends LoggingDebugSession { this._variableHandles.create( new PropertyContainer( undefined, - this._exception.exception, - ), - ), - ), + this._exception.exception + ) + ) + ) ); } @@ -3695,7 +3693,7 @@ export class NodeDebugSession extends LoggingDebugSession { protected variablesRequest( response: DebugProtocol.VariablesResponse, - args: DebugProtocol.VariablesArguments, + args: DebugProtocol.VariablesArguments ): void { const reference = args.variablesReference; const variablesContainer = this._variableHandles.get(reference); @@ -3742,7 +3740,7 @@ export class NodeDebugSession extends LoggingDebugSession { obj: V8Object, mode: FilterType, start = 0, - count?: number, + count?: number ): Promise { if (obj && !obj.properties) { // if properties are missing, this is an indication that we are running injected code which doesn't return the properties for large objects @@ -3770,9 +3768,9 @@ export class NodeDebugSession extends LoggingDebugSession { return this._createVariable( evalName, item.name, - item.value, + item.value ); - }), + }) ); }); } @@ -3842,7 +3840,7 @@ export class NodeDebugSession extends LoggingDebugSession { obj: V8Object | null, properties: V8Property[], doPreview = true, - start = 0, + start = 0 ): Promise { return this._resolveValues(properties).then(() => { return Promise.all( @@ -3877,7 +3875,7 @@ export class NodeDebugSession extends LoggingDebugSession { this.log( "va", - `_createPropertyVariables: trigger getter`, + `_createPropertyVariables: trigger getter` ); return this._node .evaluate(args) @@ -3886,14 +3884,14 @@ export class NodeDebugSession extends LoggingDebugSession { evalName, name, response.body, - doPreview, + doPreview ); }) .catch((err) => { return this._createVar( this._getEvaluateName(evalName, name), name, - "undefined", + "undefined" ); }); } else { @@ -3901,10 +3899,10 @@ export class NodeDebugSession extends LoggingDebugSession { evalName, name, val, - doPreview, + doPreview ); } - }), + }) ); }); } @@ -3917,7 +3915,7 @@ export class NodeDebugSession extends LoggingDebugSession { evalName: string | undefined, name: string, val: V8Handle, - doPreview: boolean = true, + doPreview: boolean = true ): Promise { /* if (!val) { @@ -3945,12 +3943,12 @@ export class NodeDebugSession extends LoggingDebugSession { val, doPreview ? undefined - : NodeDebugSession.PREVIEW_MAX_STRING_LENGTH, + : NodeDebugSession.PREVIEW_MAX_STRING_LENGTH ); case "number": if (typeof simple.value === "number") { return Promise.resolve( - this._createVar(en, name, simple.value.toString()), + this._createVar(en, name, simple.value.toString()) ); } break; @@ -3960,8 +3958,8 @@ export class NodeDebugSession extends LoggingDebugSession { this._createVar( en, name, - simple.value.toString().toLowerCase(), - ), + simple.value.toString().toLowerCase() + ) ); // node returns these boolean values capitalized } break; @@ -3998,7 +3996,7 @@ export class NodeDebugSession extends LoggingDebugSession { evalName, name, val, - doPreview, + doPreview ); case "RegExp": @@ -4009,9 +4007,9 @@ export class NodeDebugSession extends LoggingDebugSession { name, object.text, this._variableHandles.create( - new PropertyContainer(en, val), - ), - ), + new PropertyContainer(en, val) + ) + ) ); } break; @@ -4021,7 +4019,7 @@ export class NodeDebugSession extends LoggingDebugSession { return this._resolveValues( object.constructorFunction ? [object.constructorFunction] - : [], + : [] ).then((resolved: V8Function[]) => { if (resolved.length > 0 && resolved[0]) { const constructor_name = ( @@ -4044,7 +4042,7 @@ export class NodeDebugSession extends LoggingDebugSession { if (object.properties) { return this._objectPreview( object, - doPreview, + doPreview ).then((preview) => { if (preview) { value = `${value} ${preview}`; @@ -4054,8 +4052,8 @@ export class NodeDebugSession extends LoggingDebugSession { name, value, this._variableHandles.create( - new PropertyContainer(en, val), - ), + new PropertyContainer(en, val) + ) ); }); } @@ -4066,8 +4064,8 @@ export class NodeDebugSession extends LoggingDebugSession { name, value, this._variableHandles.create( - new PropertyContainer(en, val), - ), + new PropertyContainer(en, val) + ) ); }); //break; @@ -4094,9 +4092,9 @@ export class NodeDebugSession extends LoggingDebugSession { name, value, this._variableHandles.create( - new PropertyContainer(en, val), - ), - ), + new PropertyContainer(en, val) + ) + ) ); case "frame": @@ -4107,8 +4105,8 @@ export class NodeDebugSession extends LoggingDebugSession { this._createVar( en, name, - simple.value ? simple.value.toString() : "undefined", - ), + simple.value ? simple.value.toString() : "undefined" + ) ); } @@ -4118,14 +4116,14 @@ export class NodeDebugSession extends LoggingDebugSession { value: string, ref?: number, indexedVariables?: number, - namedVariables?: number, + namedVariables?: number ) { const v: DebugProtocol.Variable = new Variable( name, value, ref, indexedVariables, - namedVariables, + namedVariables ); if (evalName) { v.evaluateName = evalName; @@ -4135,7 +4133,7 @@ export class NodeDebugSession extends LoggingDebugSession { private _getEvaluateName( parentEvaluateName: string | undefined, - name: string, + name: string ): string | undefined { if (parentEvaluateName === undefined) { return undefined; @@ -4162,7 +4160,7 @@ export class NodeDebugSession extends LoggingDebugSession { */ private _objectPreview( object: V8Object, - doPreview: boolean, + doPreview: boolean ): Promise { if ( doPreview && @@ -4176,7 +4174,7 @@ export class NodeDebugSession extends LoggingDebugSession { undefined, object, object.properties.slice(0, NodeDebugSession.PREVIEW_PROPERTIES), - false, + false ).then((props) => { let preview = "{"; for (let i = 0; i < props.length; i++) { @@ -4205,7 +4203,7 @@ export class NodeDebugSession extends LoggingDebugSession { private _arrayPreview( array: V8Object, length: number, - doPreview: boolean, + doPreview: boolean ): Promise { if (doPreview && array && array.properties && length > 0) { const previewProps = new Array(); @@ -4229,7 +4227,7 @@ export class NodeDebugSession extends LoggingDebugSession { undefined, array, previewProps, - false, + false ).then((props) => { let preview = "["; for (let i = 0; i < props.length; i++) { @@ -4258,7 +4256,7 @@ export class NodeDebugSession extends LoggingDebugSession { evalName: string | undefined, name: string, array: V8Object, - doPreview: boolean, + doPreview: boolean ): Promise { return this._getArraySize(array).then((pair) => { let indexedSize = 0; @@ -4283,12 +4281,12 @@ export class NodeDebugSession extends LoggingDebugSession { name, v, this._variableHandles.create( - new PropertyContainer(en, array), + new PropertyContainer(en, array) ), indexedSize, - namedSize, + namedSize ); - }, + } ); }); } @@ -4328,7 +4326,7 @@ export class NodeDebugSession extends LoggingDebugSession { private _createSetMapVariable( evalName: string | undefined, name: string, - obj: V8Handle, + obj: V8Handle ): Promise { const args = { // initially we need only the size @@ -4350,14 +4348,14 @@ export class NodeDebugSession extends LoggingDebugSession { `${typename}[${indexedSize}]`, this._variableHandles.create(new SetMapContainer(en, obj)), indexedSize, - namedSize, + namedSize ); }); } public _createSetMapProperties( evalName: string | undefined, - obj: V8Handle, + obj: V8Handle ): Promise { const args = { expression: `var r = {}; Object.keys(obj).forEach(k => { r[k] = obj[k] }); r`, @@ -4373,7 +4371,7 @@ export class NodeDebugSession extends LoggingDebugSession { public _createSetElements( set: V8Handle, start: number, - count: number, + count: number ): Promise { const args = { expression: `var r = [], i = 0; set.forEach(v => { if (i >= ${start} && i < ${ @@ -4399,7 +4397,7 @@ export class NodeDebugSession extends LoggingDebugSession { null, selectedProperties, true, - start, + start ); }); } @@ -4407,7 +4405,7 @@ export class NodeDebugSession extends LoggingDebugSession { public _createMapElements( map: V8Handle, start: number, - count: number, + count: number ): Promise { // for each slot of the map we create three slots in a helper array: label, key, value const args = { @@ -4445,7 +4443,7 @@ export class NodeDebugSession extends LoggingDebugSession { this._createVariable(undefined, "key", key), this._createVariable(undefined, "value", val), ]); - }, + } ); const x = ( @@ -4456,8 +4454,8 @@ export class NodeDebugSession extends LoggingDebugSession { undefined, (start + i / 3).toString(), x.value, - this._variableHandles.create(expander), - ), + this._variableHandles.create(expander) + ) ); } return variables; @@ -4471,7 +4469,7 @@ export class NodeDebugSession extends LoggingDebugSession { evalName: string | undefined, name: string, val: V8Simple, - maxLength: number | undefined, + maxLength: number | undefined ): Promise { let str_val = val.value; @@ -4482,7 +4480,7 @@ export class NodeDebugSession extends LoggingDebugSession { str_val = str_val.substr(0, maxLength) + "…"; } return Promise.resolve( - this._createVar(en, name, this._escapeStringValue(str_val)), + this._createVar(en, name, this._escapeStringValue(str_val)) ); } @@ -4503,12 +4501,12 @@ export class NodeDebugSession extends LoggingDebugSession { return this._createVar( en, name, - this._escapeStringValue(str_val), + this._escapeStringValue(str_val) ); }); } else { return Promise.resolve( - this._createVar(en, name, this._escapeStringValue(str_val)), + this._createVar(en, name, this._escapeStringValue(str_val)) ); } } @@ -4526,7 +4524,7 @@ export class NodeDebugSession extends LoggingDebugSession { protected setVariableRequest( response: DebugProtocol.SetVariableResponse, - args: DebugProtocol.SetVariableArguments, + args: DebugProtocol.SetVariableArguments ): void { const reference = args.variablesReference; const name = args.name; @@ -4566,7 +4564,7 @@ export class NodeDebugSession extends LoggingDebugSession { frame: number, scope: number, name: string, - value: string, + value: string ): Promise { // first we are evaluating the new value @@ -4591,7 +4589,7 @@ export class NodeDebugSession extends LoggingDebugSession { return this._createVariable( undefined, "_setVariableValue", - response.body.newValue, + response.body.newValue ); }); }); @@ -4600,7 +4598,7 @@ export class NodeDebugSession extends LoggingDebugSession { public _setPropertyValue( objHandle: number, propName: string, - value: string, + value: string ): Promise { if (this._node.v8Version) { // we are doing the evaluation of the new value and the assignment to an object property in a single evaluate. @@ -4617,7 +4615,7 @@ export class NodeDebugSession extends LoggingDebugSession { return this._createVariable( undefined, "_setpropertyvalue", - response.body, + response.body ); }); } @@ -4629,7 +4627,7 @@ export class NodeDebugSession extends LoggingDebugSession { protected pauseRequest( response: DebugProtocol.PauseResponse, - args: DebugProtocol.PauseArguments, + args: DebugProtocol.PauseArguments ): void { this._node.command("suspend", null, (nodeResponse) => { if (nodeResponse.success) { @@ -4646,7 +4644,7 @@ export class NodeDebugSession extends LoggingDebugSession { protected continueRequest( response: DebugProtocol.ContinueResponse, - args: DebugProtocol.ContinueArguments, + args: DebugProtocol.ContinueArguments ): void { this._disableSkipFiles = false; this._node.command("continue", null, (nodeResponse) => { @@ -4658,20 +4656,20 @@ export class NodeDebugSession extends LoggingDebugSession { protected nextRequest( response: DebugProtocol.NextResponse, - args: DebugProtocol.NextArguments, + args: DebugProtocol.NextArguments ): void { this._node.command( "continue", { stepaction: "next" }, (nodeResponse) => { this._sendNodeResponse(response, nodeResponse); - }, + } ); } protected stepInRequest( response: DebugProtocol.StepInResponse, - args: DebugProtocol.StepInArguments, + args: DebugProtocol.StepInArguments ): void { this._node.command("continue", { stepaction: "in" }, (nodeResponse) => { this._sendNodeResponse(response, nodeResponse); @@ -4680,7 +4678,7 @@ export class NodeDebugSession extends LoggingDebugSession { protected stepOutRequest( response: DebugProtocol.StepOutResponse, - args: DebugProtocol.StepOutArguments, + args: DebugProtocol.StepOutArguments ): void { this._disableSkipFiles = false; this._node.command( @@ -4688,26 +4686,26 @@ export class NodeDebugSession extends LoggingDebugSession { { stepaction: "out" }, (nodeResponse) => { this._sendNodeResponse(response, nodeResponse); - }, + } ); } protected stepBackRequest( response: DebugProtocol.StepBackResponse, - args: DebugProtocol.StepBackArguments, + args: DebugProtocol.StepBackArguments ): void { this._node.command( "continue", { stepaction: "back" }, (nodeResponse) => { this._sendNodeResponse(response, nodeResponse); - }, + } ); } protected reverseContinueRequest( response: DebugProtocol.ReverseContinueResponse, - args: DebugProtocol.ReverseContinueArguments, + args: DebugProtocol.ReverseContinueArguments ): void { this._disableSkipFiles = false; this._node.command( @@ -4715,13 +4713,13 @@ export class NodeDebugSession extends LoggingDebugSession { { stepaction: "reverse" }, (nodeResponse) => { this._sendNodeResponse(response, nodeResponse); - }, + } ); } protected restartFrameRequest( response: DebugProtocol.RestartFrameResponse, - args: DebugProtocol.RestartFrameArguments, + args: DebugProtocol.RestartFrameArguments ): void { const restartFrameArgs: V8RestartFrameArgs = { frame: undefined, @@ -4735,7 +4733,7 @@ export class NodeDebugSession extends LoggingDebugSession { 2020, "stack frame not valid", null, - ErrorDestination.Telemetry, + ErrorDestination.Telemetry ); return; } @@ -4752,9 +4750,9 @@ export class NodeDebugSession extends LoggingDebugSession { { stepaction: "in" }, (stepInNodeResponse) => { this._sendNodeResponse(response, stepInNodeResponse); - }, + } ); - }, + } ); } @@ -4762,7 +4760,7 @@ export class NodeDebugSession extends LoggingDebugSession { protected evaluateRequest( response: DebugProtocol.EvaluateResponse, - args: DebugProtocol.EvaluateArguments, + args: DebugProtocol.EvaluateArguments ): void { const expression = args.expression; @@ -4779,7 +4777,7 @@ export class NodeDebugSession extends LoggingDebugSession { 2020, "stack frame not valid", null, - ErrorDestination.Telemetry, + ErrorDestination.Telemetry ); return; } @@ -4807,11 +4805,11 @@ export class NodeDebugSession extends LoggingDebugSession { response.success = false; response.message = localize( "eval.not.available", - "not available", + "not available" ); } this.sendResponse(response); - }, + } ); } else { response.success = false; @@ -4821,7 +4819,7 @@ export class NodeDebugSession extends LoggingDebugSession { ) { response.message = localize( "eval.not.available", - "not available", + "not available" ); } else if (resp.message.indexOf("SyntaxError: ") === 0) { const m = resp.message @@ -4830,14 +4828,14 @@ export class NodeDebugSession extends LoggingDebugSession { response.message = localize( "eval.invalid.expression", "invalid expression: {0}", - m, + m ); } else { response.message = resp.message; } this.sendResponse(response); } - }, + } ); } @@ -4845,7 +4843,7 @@ export class NodeDebugSession extends LoggingDebugSession { protected sourceRequest( response: DebugProtocol.SourceResponse, - args: DebugProtocol.SourceArguments, + args: DebugProtocol.SourceArguments ): void { // first try to use 'source.sourceReference' if (args.source && args.source.sourceReference) { @@ -4869,8 +4867,8 @@ export class NodeDebugSession extends LoggingDebugSession { 2026, localize( "source.not.found", - "Could not retrieve content.", - ), + "Could not retrieve content." + ) ); }); @@ -4883,7 +4881,7 @@ export class NodeDebugSession extends LoggingDebugSession { private sourceRequest2( response: DebugProtocol.SourceResponse, - sourceReference: number, + sourceReference: number ): void { // try to use 'sourceReference' const srcSource = this._sourceHandles.get(sourceReference); @@ -4915,8 +4913,8 @@ export class NodeDebugSession extends LoggingDebugSession { 2026, localize( "source.not.found", - "Could not retrieve content.", - ), + "Could not retrieve content." + ) ); }); return; @@ -4929,7 +4927,7 @@ export class NodeDebugSession extends LoggingDebugSession { 2027, "sourceRequest error: illegal handle", null, - ErrorDestination.Telemetry, + ErrorDestination.Telemetry ); } @@ -4982,7 +4980,7 @@ export class NodeDebugSession extends LoggingDebugSession { protected completionsRequest( response: DebugProtocol.CompletionsResponse, - args: DebugProtocol.CompletionsArguments, + args: DebugProtocol.CompletionsArguments ): void { const line = args.text; const column = args.column; @@ -5017,7 +5015,7 @@ export class NodeDebugSession extends LoggingDebugSession { 2020, "stack frame not valid", null, - ErrorDestination.Telemetry, + ErrorDestination.Telemetry ); return; } @@ -5047,7 +5045,7 @@ export class NodeDebugSession extends LoggingDebugSession { }; if ( !NodeDebugSession.PROPERTY_NAME_MATCHER.test( - name, + name ) ) { // we cannot use dot notation @@ -5095,7 +5093,7 @@ export class NodeDebugSession extends LoggingDebugSession { 2020, "stack frame not valid", null, - ErrorDestination.Telemetry, + ErrorDestination.Telemetry ); return; } @@ -5117,7 +5115,7 @@ export class NodeDebugSession extends LoggingDebugSession { } protected scopesRequest2( - frame: V8Frame, + frame: V8Frame ): Promise { const frameIx = frame.index; @@ -5131,7 +5129,7 @@ export class NodeDebugSession extends LoggingDebugSession { .then((scopesResponse) => { const scopes = scopesResponse.body.scopes; return this._resolveValues( - scopes.map((scope) => scope.object), + scopes.map((scope) => scope.object) ).then((resolved) => { const set = new Set(); const items = new Array(); @@ -5164,7 +5162,7 @@ export class NodeDebugSession extends LoggingDebugSession { protected exceptionInfoRequest( response: DebugProtocol.ExceptionInfoResponse, - args: DebugProtocol.ExceptionInfoArguments, + args: DebugProtocol.ExceptionInfoArguments ): void { if (args.threadId !== NodeDebugSession.DUMMY_THREAD_ID) { this.sendErrorResponse( @@ -5172,7 +5170,7 @@ export class NodeDebugSession extends LoggingDebugSession { 2030, "exceptionInfoRequest error: invalid thread {_thread}.", { _thread: args.threadId }, - ErrorDestination.Telemetry, + ErrorDestination.Telemetry ); return; } @@ -5199,7 +5197,7 @@ export class NodeDebugSession extends LoggingDebugSession { return this._createProperties( undefined, exception, - "named", + "named" ) .then((values) => { if ( @@ -5252,7 +5250,7 @@ export class NodeDebugSession extends LoggingDebugSession { 2031, "exceptionInfoRequest error", undefined, - ErrorDestination.Telemetry, + ErrorDestination.Telemetry ); }); } else { @@ -5261,7 +5259,7 @@ export class NodeDebugSession extends LoggingDebugSession { 2032, "exceptionInfoRequest error: no stored exception", undefined, - ErrorDestination.Telemetry, + ErrorDestination.Telemetry ); } } @@ -5270,13 +5268,13 @@ export class NodeDebugSession extends LoggingDebugSession { protected loadedSourcesRequest( response: DebugProtocol.LoadedSourcesResponse, - args: DebugProtocol.LoadedSourcesArguments, + args: DebugProtocol.LoadedSourcesArguments ) { this._node .scripts({ types: 4 }) .then((resp) => { const sources = resp.body.map((script) => - this._scriptToSource(script), + this._scriptToSource(script) ); Promise.all(sources).then((result) => { response.body = { sources: result }; @@ -5296,7 +5294,7 @@ export class NodeDebugSession extends LoggingDebugSession { protected customRequest( command: string, response: DebugProtocol.Response, - args: any, + args: any ): void { switch (command) { case "toggleSkipFileStatus": @@ -5325,7 +5323,7 @@ export class NodeDebugSession extends LoggingDebugSession { private sendNotExistErrorResponse( response: DebugProtocol.Response, attribute: string, - path: string, + path: string ) { this.sendErrorResponse( response, @@ -5334,9 +5332,9 @@ export class NodeDebugSession extends LoggingDebugSession { "attribute.path.not.exist", "Attribute '{0}' does not exist ('{1}').", attribute, - "{path}", + "{path}" ), - { path: path }, + { path: path } ); } @@ -5346,21 +5344,21 @@ export class NodeDebugSession extends LoggingDebugSession { private sendRelativePathErrorResponse( response: DebugProtocol.Response, attribute: string, - path: string, + path: string ) { const format = localize( "attribute.path.not.absolute", "Attribute '{0}' is not absolute ('{1}'); consider adding '{2}' as a prefix to make it absolute.", attribute, "{path}", - "${workspaceFolder}/", + "${workspaceFolder}/" ); this.sendErrorResponseWithInfoLink( response, 2008, format, { path: path }, - 20003, + 20003 ); } @@ -5372,7 +5370,7 @@ export class NodeDebugSession extends LoggingDebugSession { code: number, format: string, variables: any, - infoId: number, + infoId: number ) { this.sendErrorResponse(response, { id: code, @@ -5439,7 +5437,7 @@ export class NodeDebugSession extends LoggingDebugSession { private _sendNodeResponse( response: DebugProtocol.Response, - nodeResponse: NodeV8Response, + nodeResponse: NodeV8Response ): void { if (nodeResponse.success) { this.sendResponse(response); @@ -5451,9 +5449,9 @@ export class NodeDebugSession extends LoggingDebugSession { 2015, localize( "VSND2015", - "Request '{_request}' was cancelled because Node.js is unresponsive.", + "Request '{_request}' was cancelled because Node.js is unresponsive." ), - { _request: nodeResponse.command }, + { _request: nodeResponse.command } ); } else if (errmsg.indexOf("timeout") >= 0) { this.sendErrorResponse( @@ -5461,9 +5459,9 @@ export class NodeDebugSession extends LoggingDebugSession { 2016, localize( "VSND2016", - "Node.js did not respond to request '{_request}' in a reasonable amount of time.", + "Node.js did not respond to request '{_request}' in a reasonable amount of time." ), - { _request: nodeResponse.command }, + { _request: nodeResponse.command } ); } else { this.sendErrorResponse( @@ -5471,7 +5469,7 @@ export class NodeDebugSession extends LoggingDebugSession { 2013, "Node.js request '{_request}' failed (reason: {_error}).", { _request: nodeResponse.command, _error: errmsg }, - ErrorDestination.Telemetry, + ErrorDestination.Telemetry ); } } @@ -5523,7 +5521,7 @@ export class NodeDebugSession extends LoggingDebugSession { } private _resolveToCache( - handles: number[], + handles: number[] ): Promise<(V8Object | undefined)[]> { const lookup = new Array(); @@ -5578,7 +5576,7 @@ export class NodeDebugSession extends LoggingDebugSession { }); } else { return Promise.resolve( - handles.map((handle) => this._refCache.get(handle)), + handles.map((handle) => this._refCache.get(handle)) ); } } @@ -5586,7 +5584,7 @@ export class NodeDebugSession extends LoggingDebugSession { private _rememberEntryLocation( path: string, line: number, - column: number, + column: number ): void { if (path) { this._entryPath = path; @@ -5713,7 +5711,7 @@ export class NodeDebugSession extends LoggingDebugSession { const TASK_KILL = Path.join( process.env["SystemRoot"] || "C:\\WINDOWS", "System32", - "taskkill.exe", + "taskkill.exe" ); // when killing a process in Windows its child processes are *not* killed but become root processes. diff --git a/Source/node/nodeV8Protocol.ts b/Source/node/nodeV8Protocol.ts index 343f3b21..e1732ef1 100644 --- a/Source/node/nodeV8Protocol.ts +++ b/Source/node/nodeV8Protocol.ts @@ -322,7 +322,7 @@ export class NodeV8Protocol extends EE.EventEmitter { public startDispatch( inStream: NodeJS.ReadableStream, - outStream: NodeJS.WritableStream, + outStream: NodeJS.WritableStream ): void { this._sequence = 1; this._writableStream = outStream; @@ -351,7 +351,7 @@ export class NodeV8Protocol extends EE.EventEmitter { public command( command: string, args?: any, - cb?: (response: NodeV8Response) => void, + cb?: (response: NodeV8Response) => void ): void { this._command(command, args, NodeV8Protocol.TIMEOUT, cb); } @@ -359,7 +359,7 @@ export class NodeV8Protocol extends EE.EventEmitter { public command2( command: string, args?: any, - timeout: number = NodeV8Protocol.TIMEOUT, + timeout: number = NodeV8Protocol.TIMEOUT ): Promise { return new Promise((resolve, reject) => { this._command(command, args, timeout, (response) => { @@ -378,69 +378,69 @@ export class NodeV8Protocol extends EE.EventEmitter { public backtrace( args: V8BacktraceArgs, - timeout: number = NodeV8Protocol.TIMEOUT, + timeout: number = NodeV8Protocol.TIMEOUT ): Promise { return this.command2("backtrace", args); } public restartFrame( args: V8RestartFrameArgs, - timeout: number = NodeV8Protocol.TIMEOUT, + timeout: number = NodeV8Protocol.TIMEOUT ): Promise { return this.command2("restartframe", args); } public evaluate( args: V8EvaluateArgs, - timeout: number = NodeV8Protocol.TIMEOUT, + timeout: number = NodeV8Protocol.TIMEOUT ): Promise { return this.command2("evaluate", args); } public scripts( args: V8ScriptsArgs, - timeout: number = NodeV8Protocol.TIMEOUT, + timeout: number = NodeV8Protocol.TIMEOUT ): Promise { return this.command2("scripts", args); } public setVariableValue( args: V8SetVariableValueArgs, - timeout: number = NodeV8Protocol.TIMEOUT, + timeout: number = NodeV8Protocol.TIMEOUT ): Promise { return this.command2("setvariablevalue", args); } public frame( args: V8FrameArgs, - timeout: number = NodeV8Protocol.TIMEOUT, + timeout: number = NodeV8Protocol.TIMEOUT ): Promise { return this.command2("frame", args); } public setBreakpoint( args: V8SetBreakpointArgs, - timeout: number = NodeV8Protocol.TIMEOUT, + timeout: number = NodeV8Protocol.TIMEOUT ): Promise { return this.command2("setbreakpoint", args); } public setExceptionBreak( args: V8SetExceptionBreakArgs, - timeout: number = NodeV8Protocol.TIMEOUT, + timeout: number = NodeV8Protocol.TIMEOUT ): Promise { return this.command2("setexceptionbreak", args); } public clearBreakpoint( args: V8ClearBreakpointArgs, - timeout: number = NodeV8Protocol.TIMEOUT, + timeout: number = NodeV8Protocol.TIMEOUT ): Promise { return this.command2("clearbreakpoint", args); } public listBreakpoints( - timeout: number = NodeV8Protocol.TIMEOUT, + timeout: number = NodeV8Protocol.TIMEOUT ): Promise { return this.command2("listbreakpoints"); } @@ -463,7 +463,7 @@ export class NodeV8Protocol extends EE.EventEmitter { command: string, args: any, timeout: number, - cb?: (response: NodeV8Response) => void, + cb?: (response: NodeV8Response) => void ): void { const request: any = { command: command, @@ -477,8 +477,8 @@ export class NodeV8Protocol extends EE.EventEmitter { cb( new NodeV8Response( request, - localize("not.connected", "not connected to runtime"), - ), + localize("not.connected", "not connected to runtime") + ) ); } return; @@ -491,9 +491,9 @@ export class NodeV8Protocol extends EE.EventEmitter { request, localize( "runtime.unresponsive", - "cancelled because Node.js is unresponsive", - ), - ), + "cancelled because Node.js is unresponsive" + ) + ) ); } return; @@ -515,16 +515,16 @@ export class NodeV8Protocol extends EE.EventEmitter { localize( "runtime.timeout", "timeout after {0} ms", - timeout, - ), - ), + timeout + ) + ) ); this._unresponsiveMode = true; this.emitEvent( new NodeV8Event("diagnostic", { reason: `request '${command}' timed out'`, - }), + }) ); } }, timeout); @@ -559,7 +559,7 @@ export class NodeV8Protocol extends EE.EventEmitter { if (this._unresponsiveMode) { this._unresponsiveMode = false; this.emitEvent( - new NodeV8Event("diagnostic", { reason: "responsive" }), + new NodeV8Event("diagnostic", { reason: "responsive" }) ); } const response = message; @@ -588,7 +588,7 @@ export class NodeV8Protocol extends EE.EventEmitter { const message = this._rawData.toString( "utf8", 0, - this._contentLength, + this._contentLength ); this._rawData = this._rawData.slice(this._contentLength); this._contentLength = -1; @@ -615,7 +615,7 @@ export class NodeV8Protocol extends EE.EventEmitter { break; case "Embedding-Host": const match = pair[1].match( - /node\sv(\d+)\.(\d+)\.(\d+)/, + /node\sv(\d+)\.(\d+)\.(\d+)/ ); if (match && match.length === 4) { this.embeddedHostVersion = @@ -627,7 +627,7 @@ export class NodeV8Protocol extends EE.EventEmitter { this.embeddedHostVersion = 60500; // TODO this needs to be detected in a smarter way by looking at the V8 version in Electron } const match1 = pair[1].match( - /node\s(v\d+\.\d+\.\d+)/, + /node\s(v\d+\.\d+\.\d+)/ ); if (match1 && match1.length === 2) { this.hostVersion = match1[1]; @@ -639,7 +639,7 @@ export class NodeV8Protocol extends EE.EventEmitter { } } this._rawData = this._rawData.slice( - idx + NodeV8Protocol.TWO_CRLF.length, + idx + NodeV8Protocol.TWO_CRLF.length ); continue; // try to handle a complete message } diff --git a/Source/node/pathUtilities.ts b/Source/node/pathUtilities.ts index b8bf2df4..3cd1395c 100644 --- a/Source/node/pathUtilities.ts +++ b/Source/node/pathUtilities.ts @@ -178,7 +178,7 @@ export function findOnPath(program: string, args_env: any): string | undefined { */ export function findExecutable( program: string, - args_env: any, + args_env: any ): string | undefined { const env = extendObject(extendObject({}, process.env), args_env); @@ -304,7 +304,7 @@ export function multiGlob(patterns: string[], opts?): Promise { symlinks: Object.create(null), ignore: [], }, - opts, + opts ); const isExclude = (pattern) => pattern[0] === "!"; @@ -342,7 +342,7 @@ export function multiGlob(patterns: string[], opts?): Promise { } }); }); - }), + }) ).then((results) => { const set = new Set(); for (let paths of results) { @@ -375,7 +375,7 @@ export function multiGlobMatches(patterns: string[], path: string): boolean { */ export function extendObject( toObject: T, - fromObject: T | undefined, + fromObject: T | undefined ): T { if (fromObject) { for (let key in fromObject) { diff --git a/Source/node/sourceMaps.ts b/Source/node/sourceMaps.ts index 7529380c..64f39bcf 100644 --- a/Source/node/sourceMaps.ts +++ b/Source/node/sourceMaps.ts @@ -42,7 +42,7 @@ export interface ISourceMaps { path: string, line: number, column: number, - bias?: Bias, + bias?: Bias ): Promise; /* @@ -53,7 +53,7 @@ export interface ISourceMaps { pathToGenerated: string, content: string | null, line: number, - column: number, + column: number ): Promise; /* @@ -64,7 +64,7 @@ export interface ISourceMaps { pathToGenerated: string, content: string | null, line: number, - column: number, + column: number ): Promise; /* @@ -75,7 +75,7 @@ export interface ISourceMaps { export class SourceMaps implements ISourceMaps { private static SOURCE_MAPPING_MATCHER = new RegExp( - "^//[#@] ?sourceMappingURL=(.+)$", + "^//[#@] ?sourceMappingURL=(.+)$" ); private _session: NodeDebugSession; @@ -87,7 +87,7 @@ export class SourceMaps implements ISourceMaps { public constructor( session: NodeDebugSession, generatedCodeDirectory?: string, - generatedCodeGlobs?: string[], + generatedCodeGlobs?: string[] ) { this._session = session; @@ -109,7 +109,7 @@ export class SourceMaps implements ISourceMaps { .catch((err) => { return null; }); - }), + }) ) .then((results) => { return void 0; @@ -118,7 +118,7 @@ export class SourceMaps implements ISourceMaps { // silently ignore errors return void 0; }); - }, + } ); } else { this._preLoad = Promise.resolve(void 0); @@ -130,7 +130,7 @@ export class SourceMaps implements ISourceMaps { return this._findSourceToGeneratedMapping(pathToSource).then( (map) => { return map ? map.generatedPath() : null; - }, + } ); }); } @@ -139,7 +139,7 @@ export class SourceMaps implements ISourceMaps { pathToSource: string, line: number, column: number, - bias?: Bias, + bias?: Bias ): Promise { return this._preLoad.then(() => { return this._findSourceToGeneratedMapping(pathToSource).then( @@ -150,7 +150,7 @@ export class SourceMaps implements ISourceMaps { pathToSource, line, column, - bias, + bias ); if (mr && mr.line !== null && mr.column !== null) { return { @@ -161,7 +161,7 @@ export class SourceMaps implements ISourceMaps { } } return null; - }, + } ); }); } @@ -170,25 +170,25 @@ export class SourceMaps implements ISourceMaps { pathToGenerated: string, content: string, line: number, - column: number, + column: number ): Promise { return this._preLoad.then(() => { return this._findGeneratedToSourceMapping( pathToGenerated, - content, + content ).then((map) => { if (map) { line += 1; // source map impl is 1 based let mr = map.originalPositionFor( line, column, - Bias.GREATEST_LOWER_BOUND, + Bias.GREATEST_LOWER_BOUND ); if (!mr) { mr = map.originalPositionFor( line, column, - Bias.LEAST_UPPER_BOUND, + Bias.LEAST_UPPER_BOUND ); } if ( @@ -210,25 +210,25 @@ export class SourceMaps implements ISourceMaps { pathToGenerated: string, content: string, line: number, - column: number, + column: number ): Promise { return this._preLoad.then(() => { return this._findGeneratedToSourceMapping( pathToGenerated, - content, + content ).then((map) => { if (map) { line += 1; // source map impl is 1 based let mr = map.originalPositionFor( line, column, - Bias.GREATEST_LOWER_BOUND, + Bias.GREATEST_LOWER_BOUND ); if (!mr) { mr = map.originalPositionFor( line, column, - Bias.LEAST_UPPER_BOUND, + Bias.LEAST_UPPER_BOUND ); } if ( @@ -276,7 +276,7 @@ export class SourceMaps implements ISourceMaps { * and some heuristics. */ private _findSourceToGeneratedMapping( - pathToSource: string, + pathToSource: string ): Promise { if (!pathToSource) { return Promise.resolve(null); @@ -301,7 +301,7 @@ export class SourceMaps implements ISourceMaps { if (pos >= 0) { pathToGenerated = pathToSource.substr(0, pos) + ".js"; return this._findGeneratedToSourceMapping( - pathToGenerated, + pathToGenerated ); } } @@ -316,7 +316,7 @@ export class SourceMaps implements ISourceMaps { if (pathToGenerated.indexOf(srcSegment) >= 0) { const outSegment = Path.sep + "out" + Path.sep; return this._findGeneratedToSourceMapping( - pathToGenerated.replace(srcSegment, outSegment), + pathToGenerated.replace(srcSegment, outSegment) ); } } @@ -338,7 +338,7 @@ export class SourceMaps implements ISourceMaps { */ private _findGeneratedToSourceMapping( pathToGenerated: string, - content?: string, + content?: string ): Promise { if (!pathToGenerated) { return Promise.resolve(null); @@ -362,12 +362,12 @@ export class SourceMaps implements ISourceMaps { if (FS.existsSync(map_path)) { return this._getSourceMap( URI.file(map_path), - pathToGenerated, + pathToGenerated ); } return Promise.resolve(null); - }, + } ); } @@ -377,11 +377,11 @@ export class SourceMaps implements ISourceMaps { */ private _findSourceMapUrlInFile( pathToGenerated: string, - content?: string, + content?: string ): Promise { if (content) { return Promise.resolve( - this._findSourceMapUrl(content, pathToGenerated), + this._findSourceMapUrl(content, pathToGenerated) ); } @@ -401,7 +401,7 @@ export class SourceMaps implements ISourceMaps { */ private _findSourceMapUrl( contents: string, - pathToGenerated: string, + pathToGenerated: string ): URI | null { const lines = contents.split("\n"); for ( @@ -416,12 +416,12 @@ export class SourceMaps implements ISourceMaps { let uri = matches[1].trim(); if (pathToGenerated) { this._log( - `_findSourceMapUrl: source map url found at end of generated file '${pathToGenerated}'`, + `_findSourceMapUrl: source map url found at end of generated file '${pathToGenerated}'` ); return URI.parse(uri, Path.dirname(pathToGenerated)); } else { this._log( - `_findSourceMapUrl: source map url found at end of generated content`, + `_findSourceMapUrl: source map url found at end of generated content` ); return URI.parse(uri); } @@ -435,7 +435,7 @@ export class SourceMaps implements ISourceMaps { */ private _getSourceMap( uri: URI | null, - pathToGenerated: string, + pathToGenerated: string ): Promise { if (!uri) { return Promise.resolve(null); @@ -452,7 +452,7 @@ export class SourceMaps implements ISourceMaps { this._sourceMapCache.set(hash, promise); } catch (err) { this._log( - `_loadSourceMap: loading source map '${uri.uri()}' failed with exception: ${err}`, + `_loadSourceMap: loading source map '${uri.uri()}' failed with exception: ${err}` ); return Promise.resolve(null); } @@ -464,13 +464,13 @@ export class SourceMaps implements ISourceMaps { private registerSourceMap( map_path: string, pathToGenerated: string, - content: string, + content: string ): Promise { return SourceMap.newSourceMap(map_path, pathToGenerated, content).then( (sm) => { this._registerSourceMap(sm); return sm; - }, + } ); } @@ -480,7 +480,7 @@ export class SourceMaps implements ISourceMaps { private _loadSourceMap( uri: URI, pathToGenerated: string, - hash: string, + hash: string ): Promise { if (uri.isFile()) { const map_path = uri.filePath(); @@ -488,7 +488,7 @@ export class SourceMaps implements ISourceMaps { return this.registerSourceMap( map_path, pathToGenerated, - content, + content ); }); } @@ -503,7 +503,7 @@ export class SourceMaps implements ISourceMaps { return this.registerSourceMap( pathToGenerated, pathToGenerated, - json, + json ); } } catch (e) { @@ -518,7 +518,7 @@ export class SourceMaps implements ISourceMaps { OS.tmpdir(), "com.microsoft.VSCode", "node-debug", - "sm-cache", + "sm-cache" ); const path = Path.join(cache_path, hash); @@ -528,7 +528,7 @@ export class SourceMaps implements ISourceMaps { return this.registerSourceMap( pathToGenerated, pathToGenerated, - content, + content ); }); } @@ -542,19 +542,19 @@ export class SourceMaps implements ISourceMaps { .then((response) => { return this._writeFile( path, - response.responseText, + response.responseText ).then((content) => { return this.registerSourceMap( pathToGenerated, pathToGenerated, - content, + content ); }); }) .catch((error: XHR.XHRResponse) => { return Promise.reject( XHR.getErrorStatusDescription(error.status) || - error.toString(), + error.toString() ); }); }); @@ -582,7 +582,7 @@ export class SourceMaps implements ISourceMaps { private _readFile( path: string, - encoding: string = "utf8", + encoding: string = "utf8" ): Promise { return new Promise((resolve, reject) => { FS.readFile(path, encoding, (err, fileContents) => { @@ -623,7 +623,7 @@ export class SourceMap { public static newSourceMap( mapPath: string, generatedPath: string, - json: string, + json: string ): Promise { const sm = new SourceMap(); return sm.init(mapPath, generatedPath, json); @@ -634,7 +634,7 @@ export class SourceMap { private init( mapPath: string, generatedPath: string, - json: string, + json: string ): Promise { this._sourcemapLocation = this.fixPath(Path.dirname(mapPath)); @@ -715,7 +715,7 @@ export class SourceMap { public originalPositionFor( line: number, column: number, - bias: Bias, + bias: Bias ): SM./*Nullable*/ MappedPosition | null { if (!this._smc) { return null; @@ -751,7 +751,7 @@ export class SourceMap { absPath: string, line: number, column: number, - bias?: Bias, + bias?: Bias ): SM./*Nullable*/ Position | null { if (!this._smc) { return null; diff --git a/Source/node/terminateProcess.sh b/Source/node/terminateProcess.sh index 25320a31..9b068843 100644 --- a/Source/node/terminateProcess.sh +++ b/Source/node/terminateProcess.sh @@ -4,7 +4,7 @@ terminateTree() { for cpid in $(/usr/bin/pgrep -P $1); do terminateTree $cpid done - kill -9 $1 >/dev/null 2>&1 + kill -9 $1 > /dev/null 2>&1 } for pid in $*; do diff --git a/Source/node/wslSupport.ts b/Source/node/wslSupport.ts index ed260455..b56514cb 100644 --- a/Source/node/wslSupport.ts +++ b/Source/node/wslSupport.ts @@ -22,7 +22,7 @@ export function subsystemLinuxPresent(): boolean { } function windowsPathToWSLPath( - windowsPath: string | undefined, + windowsPath: string | undefined ): string | undefined { if (!isWindows || !windowsPath) { return undefined; @@ -50,7 +50,7 @@ export function createLaunchArg( cwd: string | undefined, executable: string, args?: string[], - program?: string, + program?: string ): ILaunchArgs { if (useSubsytemLinux && subsystemLinuxPresent()) { const sysRoot = process.env["SystemRoot"] || "C:\\WINDOWS"; @@ -94,18 +94,18 @@ export function spawnSync( useWSL: boolean, executable: string, args?: string[], - options?: child_process.SpawnSyncOptions, + options?: child_process.SpawnSyncOptions ) { const launchArgs = createLaunchArg( useWSL, false, undefined, executable, - args, + args ); return child_process.spawnSync( launchArgs.executable, launchArgs.args, - useWSL ? undefined : options, + useWSL ? undefined : options ); } diff --git a/Source/tsconfig.json b/Source/tsconfig.json index a1ed54bd..a2b9be69 100644 --- a/Source/tsconfig.json +++ b/Source/tsconfig.json @@ -15,8 +15,5 @@ "strictNullChecks": true, "noUnusedParameters": false }, - "exclude": [ - "node_modules", - "testdata/" - ] + "exclude": ["node_modules", "testdata/"] } diff --git a/appveyor.yml b/appveyor.yml index 22e78f95..f143cb4c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,8 +1,8 @@ install: - - ps: Install-Product node 7.9.0 x64 + - ps: Install-Product node 7.9.0 x64 build_script: - - npm install + - npm install test_script: - - npm test + - npm test diff --git a/build/pipeline.yml b/build/pipeline.yml index b84567cd..1b387be1 100644 --- a/build/pipeline.yml +++ b/build/pipeline.yml @@ -1,24 +1,24 @@ name: $(Date:yyyyMMdd)$(Rev:.r) trigger: - branches: - include: - - main - tags: - include: ["*"] + branches: + include: + - main + tags: + include: ["*"] pr: none resources: - repositories: - - repository: templates - type: github - name: microsoft/vscode-engineering - ref: main - endpoint: Monaco + repositories: + - repository: templates + type: github + name: microsoft/vscode-engineering + ref: main + endpoint: Monaco extends: - template: azure-pipelines/extension/stable.yml@templates - parameters: - buildSteps: - - script: yarn install --frozen-lockfile - displayName: Install dependencies + template: azure-pipelines/extension/stable.yml@templates + parameters: + buildSteps: + - script: yarn install --frozen-lockfile + displayName: Install dependencies diff --git a/gulpfile.js b/gulpfile.js index 89092fae..04742de0 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -65,29 +65,29 @@ gulp.task( "internal-minify-scripts", (done) => { done(); - }, - ), + } + ) ); gulp.task( "build", gulp.series("clean", "internal-build", (done) => { done(); - }), + }) ); gulp.task( "default", gulp.series("build", (done) => { done(); - }), + }) ); gulp.task( "compile", gulp.series("clean", "internal-build", (done) => { done(); - }), + }) ); gulp.task("nls-bundle-create", () => { @@ -111,8 +111,8 @@ gulp.task( "nls-bundle-create", (done) => { done(); - }, - ), + } + ) ); gulp.task( @@ -121,7 +121,7 @@ gulp.task( //log('Watching build sources...'); gulp.watch(watchedSources, gulp.series("internal-build")); done(); - }), + }) ); gulp.task( @@ -134,13 +134,10 @@ gulp.task( path.join(webPackedDest, "nls.metadata.json"), ]) .pipe( - nls.createXlfFiles( - transifexProjectName, - transifexExtensionName, - ), + nls.createXlfFiles(transifexProjectName, transifexExtensionName) ) .pipe(gulp.dest(path.join("..", "vscode-translations-export"))); - }), + }) ); //---- internal @@ -157,7 +154,7 @@ function compile() { includeContent: inlineSource, // Return relative source map root directories per file. sourceRoot: "../src", - }), + }) ); } @@ -175,12 +172,12 @@ gulp.task("tslint", (done) => { tslint({ formatter: "prose", rulesDirectory: "node_modules/tslint-microsoft-contrib", - }), + }) ) .pipe( tslint.report({ emitError: false, - }), + }) ); done(); }); diff --git a/package.json b/package.json index af6e13d0..848be2ac 100644 --- a/package.json +++ b/package.json @@ -1,494 +1,494 @@ { - "name": "node-debug", - "displayName": "[Deprecated] Node Debug (legacy)", - "version": "1.45.0", - "publisher": "ms-vscode", - "description": "%extension.description%", - "icon": "images/node-debug-icon.png", - "author": { - "name": "Microsoft Corporation" - }, - "license": "MIT", - "private": true, - "scripts": { - "build": "gulp build", - "watch": "gulp watch", - "test": "gulp compile && mocha --timeout 10000 -u tdd ./out/tests/", - "nodemon": "nodemon --debug --nolazy ./dist/nodeDebug.js --server=4711", - "prepublish": "gulp build", - "vscode:prepublish": "gulp prepare-for-webpack && webpack --mode production --vscode-nls", - "package": "gulp prepare-for-webpack && webpack --mode production --vscode-nls && vsce package --yarn", - "publish": "gulp prepare-for-webpack && webpack --mode production --vscode-nls && vsce publish", - "bump": "npm version patch -m 'bump to %s'", - "tslint": "gulp tslint", - "translations-export": "gulp translations-export" - }, - "extensionDependencies": [ - "ms-vscode.node-debug2" - ], - "repository": { - "type": "git", - "url": "https://github.com/Microsoft/vscode-node-debug.git" - }, - "bugs": { - "url": "https://github.com/Microsoft/vscode-node-debug/issues" - }, - "dependencies": { - "glob": "10.3.10", - "minimatch": "9.0.3", - "request-light": "0.7.0", - "source-map": "0.7.4", - "vscode-debugadapter": "1.48.0", - "vscode-nls": "5.2.0" - }, - "devDependencies": { - "@types/mocha": "10.0.6", - "@types/node": "20.10.4", - "@types/vscode": "1.85.0", - "copy-webpack-plugin": "11.0.0", - "del": "7.1.0", - "gulp": "4.0.2", - "gulp-filter": "9.0.1", - "gulp-sourcemaps": "3.0.0", - "gulp-tsb": "4.0.5", - "gulp-tslint": "8.1.4", - "gulp-typescript": "5.0.1", - "gulp-uglify": "3.0.2", - "mocha": "10.2.0", - "ts-loader": "9.5.1", - "tslint-microsoft-contrib": "6.2.0", - "tsutils": "3.21.0", - "typescript": "5.3.3", - "vsce": "1.88.0", - "vscode-debugadapter-testsupport": "1.48.0", - "vscode-debugprotocol": "1.48.0", - "vscode-nls-dev": "4.0.4", - "webpack": "5.89.0", - "webpack-cli": "5.1.4", - "yargs-parser": "21.1.1" - }, - "resolutions": { - "gulp/**/yargs-parser": "5.0.0-security.0" - }, - "main": "./dist/extension.js", - "activationEvents": [ - "onDebugResolve:legacy-node", - "onCommand:extension.pickNodeProcess", - "onCommand:extension.node-debug.toggleSkippingFile", - "onCommand:extension.node-debug.attachNodeProcess", - "onCommand:extension.node-debug.startAutoAttach" - ], - "capabilities": { - "virtualWorkspaces": false, - "untrustedWorkspaces": { - "supported": true - } - }, - "contributes": { - "configuration": { - "title": "Node debug", - "properties": { - "debug.node.showUseWslIsDeprecatedWarning": { - "scope": "window", - "type": "boolean", - "description": "%debug.node.showUseWslIsDeprecatedWarning.description%", - "default": true - } - } - }, - "menus": { - "debug/callstack/context": [ - { - "command": "extension.node-debug.toggleSkippingFile", - "group": "navigation", - "when": "inDebugMode && debugType == 'legacy-node' && callStackItemType == 'stackFrame'" - } - ] - }, - "commands": [ - { - "command": "extension.node-debug.attachNodeProcess", - "title": "%attach.node.process%", - "category": "Debug" - }, - { - "command": "extension.node-debug.toggleSkippingFile", - "title": "%toggle.skipping.this.file%", - "category": "Debug" - } - ], - "breakpoints": [ - { - "language": "javascript" - }, - { - "language": "javascriptreact" - } - ], - "debuggers": [ - { - "type": "legacy-node", - "label": "%node.label%", - "program": "./dist/nodeDebug.js", - "runtime": "node", - "variables": { - "PickProcess": "extension.pickNodeProcess" - }, - "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", - "languages": [ - "javascript", - "typescript", - "javascriptreact", - "typescriptreact" - ], - "configurationAttributes": { - "launch": { - "properties": { - "protocol": { - "type": "string", - "enum": [ - "auto", - "inspector", - "legacy" - ], - "enumDescriptions": [ - "%node.protocol.auto.description%", - "%node.protocol.inspector.description%", - "%node.protocol.legacy.description%" - ], - "description": "%node.protocol.description%", - "default": "inspector" - }, - "program": { - "type": "string", - "description": "%node.launch.program.description%" - }, - "stopOnEntry": { - "type": "boolean", - "description": "%node.stopOnEntry.description%", - "default": true - }, - "externalConsole": { - "type": "boolean", - "deprecationMessage": "%node.launch.externalConsole.deprecationMessage%", - "default": true - }, - "console": { - "type": "string", - "enum": [ - "internalConsole", - "integratedTerminal", - "externalTerminal" - ], - "enumDescriptions": [ - "%node.launch.console.internalConsole.description%", - "%node.launch.console.integratedTerminal.description%", - "%node.launch.console.externalTerminal.description%" - ], - "description": "%node.launch.console.description%", - "default": "internalConsole" - }, - "args": { - "type": "array", - "description": "%launch.args.description%", - "items": { - "type": "string" - }, - "default": [] - }, - "cwd": { - "type": "string", - "description": "%node.launch.cwd.description%", - "default": "${workspaceFolder}" - }, - "runtimeExecutable": { - "type": [ - "string", - "null" - ], - "markdownDescription": "%node.launch.runtimeExecutable.description%", - "default": "node" - }, - "runtimeVersion": { - "type": "string", - "markdownDescription": "%node.launch.runtimeVersion.description%", - "default": "default" - }, - "runtimeArgs": { - "type": "array", - "description": "%node.launch.runtimeArgs.description%", - "items": { - "type": "string" - }, - "default": [] - }, - "env": { - "type": "object", - "additionalProperties": { - "type": [ - "string", - "null" - ] - }, - "markdownDescription": "%node.launch.env.description%", - "default": {} - }, - "envFile": { - "type": "string", - "description": "%node.launch.envFile.description%", - "default": "${workspaceFolder}/.env" - }, - "sourceMaps": { - "type": "boolean", - "description": "%node.sourceMaps.description%", - "default": true - }, - "outDir": { - "type": [ - "string", - "null" - ], - "deprecationMessage": "%outDir.deprecationMessage%", - "default": null - }, - "outFiles": { - "type": "array", - "markdownDescription": "%outFiles.description%", - "items": { - "type": "string" - }, - "default": [] - }, - "port": { - "type": "number", - "description": "%node.port.description%", - "default": 9229 - }, - "address": { - "type": "string", - "description": "%node.address.description%", - "default": "localhost" - }, - "timeout": { - "type": "number", - "description": "%node.timeout.description%", - "default": 10000 - }, - "restart": { - "type": "boolean", - "description": "%node.restart.description%", - "default": true - }, - "localRoot": { - "type": [ - "string", - "null" - ], - "description": "%node.localRoot.description%", - "default": null - }, - "remoteRoot": { - "type": [ - "string", - "null" - ], - "description": "%node.remoteRoot.description%", - "default": null - }, - "smartStep": { - "type": "boolean", - "description": "%smartStep.description%", - "default": true - }, - "skipFiles": { - "type": "array", - "markdownDescription": "%skipFiles.description%", - "items": { - "type": "string" - }, - "default": [] - }, - "showAsyncStacks": { - "type": "boolean", - "description": "%node.showAsyncStacks.description%", - "default": true - }, - "useWSL": { - "type": "boolean", - "description": "%node.launch.useWSL.description%", - "default": true, - "deprecationMessage": "%node.launch.useWSL.deprecation%" - }, - "trace": { - "type": [ - "boolean", - "string" - ], - "description": "%trace.description%", - "default": true - }, - "outputCapture": { - "enum": [ - "console", - "std" - ], - "description": "%node.launch.outputCapture.description%", - "default": "console" - }, - "sourceMapPathOverrides": { - "type": "object", - "description": "%node.sourceMapPathOverrides.description%", - "default": { - "webpack:///./~/*": "${workspaceRoot}/node_modules/*", - "webpack:///./*": "${workspaceRoot}/*", - "webpack:///*": "*" - } - }, - "autoAttachChildProcesses": { - "type": "boolean", - "description": "%node.launch.autoAttachChildProcesses.description%", - "default": true - }, - "disableOptimisticBPs": { - "type": "boolean", - "description": "%node.disableOptimisticBPs.description%", - "default": true - } - } - }, - "attach": { - "properties": { - "protocol": { - "type": "string", - "enum": [ - "auto", - "inspector", - "legacy" - ], - "enumDescriptions": [ - "%node.protocol.auto.description%", - "%node.protocol.inspector.description%", - "%node.protocol.legacy.description%" - ], - "description": "%node.protocol.description%", - "default": "inspector" - }, - "cwd": { - "type": "string", - "description": "%node.launch.cwd.description%", - "default": "${workspaceFolder}" - }, - "processId": { - "type": "string", - "description": "%node.attach.processId.description%", - "default": "${command:PickProcess}" - }, - "port": { - "type": "number", - "description": "%node.port.description%", - "default": 9229 - }, - "address": { - "type": "string", - "description": "%node.address.description%", - "default": "localhost" - }, - "timeout": { - "type": "number", - "description": "%node.timeout.description%", - "default": 10000 - }, - "restart": { - "type": "boolean", - "description": "%node.restart.description%", - "default": true - }, - "sourceMaps": { - "type": "boolean", - "description": "%node.sourceMaps.description%", - "default": true - }, - "outDir": { - "type": [ - "string", - "null" - ], - "deprecationMessage": "%outDir.deprecationMessage%", - "default": null - }, - "outFiles": { - "type": "array", - "markdownDescription": "%outFiles.description%", - "items": { - "type": "string" - }, - "default": [] - }, - "stopOnEntry": { - "type": "boolean", - "description": "%node.stopOnEntry.description%", - "default": true - }, - "localRoot": { - "type": [ - "string", - "null" - ], - "description": "%node.localRoot.description%", - "default": null - }, - "remoteRoot": { - "type": [ - "string", - "null" - ], - "description": "%node.remoteRoot.description%", - "default": null - }, - "smartStep": { - "type": "boolean", - "description": "%smartStep.description%", - "default": true - }, - "skipFiles": { - "type": "array", - "markdownDescription": "%skipFiles.description%", - "items": { - "type": "string" - }, - "default": [] - }, - "showAsyncStacks": { - "type": "boolean", - "description": "%node.showAsyncStacks.description%", - "default": true - }, - "trace": { - "type": [ - "boolean", - "string" - ], - "description": "%trace.description%", - "default": true - }, - "sourceMapPathOverrides": { - "type": "object", - "description": "%node.sourceMapPathOverrides.description%", - "default": { - "webpack:///./~/*": "${workspaceRoot}/node_modules/*", - "webpack:///./*": "${workspaceRoot}/*", - "webpack:///*": "*" - } - }, - "disableOptimisticBPs": { - "type": "boolean", - "description": "%node.disableOptimisticBPs.description%", - "default": true - } - } - } - } - } - ] - } + "name": "node-debug", + "displayName": "[Deprecated] Node Debug (legacy)", + "version": "1.45.0", + "private": true, + "description": "%extension.description%", + "bugs": { + "url": "https://github.com/Microsoft/vscode-node-debug/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/vscode-node-debug.git" + }, + "license": "MIT", + "author": { + "name": "Microsoft Corporation" + }, + "publisher": "ms-vscode", + "main": "./dist/extension.js", + "scripts": { + "build": "gulp build", + "bump": "npm version patch -m 'bump to %s'", + "nodemon": "nodemon --debug --nolazy ./dist/nodeDebug.js --server=4711", + "package": "gulp prepare-for-webpack && webpack --mode production --vscode-nls && vsce package --yarn", + "prepublish": "gulp build", + "publish": "gulp prepare-for-webpack && webpack --mode production --vscode-nls && vsce publish", + "test": "gulp compile && mocha --timeout 10000 -u tdd ./out/tests/", + "translations-export": "gulp translations-export", + "tslint": "gulp tslint", + "vscode:prepublish": "gulp prepare-for-webpack && webpack --mode production --vscode-nls", + "watch": "gulp watch" + }, + "contributes": { + "breakpoints": [ + { + "language": "javascript" + }, + { + "language": "javascriptreact" + } + ], + "commands": [ + { + "command": "extension.node-debug.attachNodeProcess", + "title": "%attach.node.process%", + "category": "Debug" + }, + { + "command": "extension.node-debug.toggleSkippingFile", + "title": "%toggle.skipping.this.file%", + "category": "Debug" + } + ], + "configuration": { + "title": "Node debug", + "properties": { + "debug.node.showUseWslIsDeprecatedWarning": { + "scope": "window", + "type": "boolean", + "description": "%debug.node.showUseWslIsDeprecatedWarning.description%", + "default": true + } + } + }, + "debuggers": [ + { + "type": "legacy-node", + "label": "%node.label%", + "program": "./dist/nodeDebug.js", + "runtime": "node", + "variables": { + "PickProcess": "extension.pickNodeProcess" + }, + "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", + "languages": [ + "javascript", + "typescript", + "javascriptreact", + "typescriptreact" + ], + "configurationAttributes": { + "launch": { + "properties": { + "protocol": { + "type": "string", + "enum": [ + "auto", + "inspector", + "legacy" + ], + "enumDescriptions": [ + "%node.protocol.auto.description%", + "%node.protocol.inspector.description%", + "%node.protocol.legacy.description%" + ], + "description": "%node.protocol.description%", + "default": "inspector" + }, + "program": { + "type": "string", + "description": "%node.launch.program.description%" + }, + "stopOnEntry": { + "type": "boolean", + "description": "%node.stopOnEntry.description%", + "default": true + }, + "externalConsole": { + "type": "boolean", + "deprecationMessage": "%node.launch.externalConsole.deprecationMessage%", + "default": true + }, + "console": { + "type": "string", + "enum": [ + "internalConsole", + "integratedTerminal", + "externalTerminal" + ], + "enumDescriptions": [ + "%node.launch.console.internalConsole.description%", + "%node.launch.console.integratedTerminal.description%", + "%node.launch.console.externalTerminal.description%" + ], + "description": "%node.launch.console.description%", + "default": "internalConsole" + }, + "args": { + "type": "array", + "description": "%launch.args.description%", + "items": { + "type": "string" + }, + "default": [] + }, + "cwd": { + "type": "string", + "description": "%node.launch.cwd.description%", + "default": "${workspaceFolder}" + }, + "runtimeExecutable": { + "type": [ + "string", + "null" + ], + "markdownDescription": "%node.launch.runtimeExecutable.description%", + "default": "node" + }, + "runtimeVersion": { + "type": "string", + "markdownDescription": "%node.launch.runtimeVersion.description%", + "default": "default" + }, + "runtimeArgs": { + "type": "array", + "description": "%node.launch.runtimeArgs.description%", + "items": { + "type": "string" + }, + "default": [] + }, + "env": { + "type": "object", + "additionalProperties": { + "type": [ + "string", + "null" + ] + }, + "markdownDescription": "%node.launch.env.description%", + "default": {} + }, + "envFile": { + "type": "string", + "description": "%node.launch.envFile.description%", + "default": "${workspaceFolder}/.env" + }, + "sourceMaps": { + "type": "boolean", + "description": "%node.sourceMaps.description%", + "default": true + }, + "outDir": { + "type": [ + "string", + "null" + ], + "deprecationMessage": "%outDir.deprecationMessage%", + "default": null + }, + "outFiles": { + "type": "array", + "markdownDescription": "%outFiles.description%", + "items": { + "type": "string" + }, + "default": [] + }, + "port": { + "type": "number", + "description": "%node.port.description%", + "default": 9229 + }, + "address": { + "type": "string", + "description": "%node.address.description%", + "default": "localhost" + }, + "timeout": { + "type": "number", + "description": "%node.timeout.description%", + "default": 10000 + }, + "restart": { + "type": "boolean", + "description": "%node.restart.description%", + "default": true + }, + "localRoot": { + "type": [ + "string", + "null" + ], + "description": "%node.localRoot.description%", + "default": null + }, + "remoteRoot": { + "type": [ + "string", + "null" + ], + "description": "%node.remoteRoot.description%", + "default": null + }, + "smartStep": { + "type": "boolean", + "description": "%smartStep.description%", + "default": true + }, + "skipFiles": { + "type": "array", + "markdownDescription": "%skipFiles.description%", + "items": { + "type": "string" + }, + "default": [] + }, + "showAsyncStacks": { + "type": "boolean", + "description": "%node.showAsyncStacks.description%", + "default": true + }, + "useWSL": { + "type": "boolean", + "description": "%node.launch.useWSL.description%", + "default": true, + "deprecationMessage": "%node.launch.useWSL.deprecation%" + }, + "trace": { + "type": [ + "boolean", + "string" + ], + "description": "%trace.description%", + "default": true + }, + "outputCapture": { + "enum": [ + "console", + "std" + ], + "description": "%node.launch.outputCapture.description%", + "default": "console" + }, + "sourceMapPathOverrides": { + "type": "object", + "description": "%node.sourceMapPathOverrides.description%", + "default": { + "webpack:///./~/*": "${workspaceRoot}/node_modules/*", + "webpack:///./*": "${workspaceRoot}/*", + "webpack:///*": "*" + } + }, + "autoAttachChildProcesses": { + "type": "boolean", + "description": "%node.launch.autoAttachChildProcesses.description%", + "default": true + }, + "disableOptimisticBPs": { + "type": "boolean", + "description": "%node.disableOptimisticBPs.description%", + "default": true + } + } + }, + "attach": { + "properties": { + "protocol": { + "type": "string", + "enum": [ + "auto", + "inspector", + "legacy" + ], + "enumDescriptions": [ + "%node.protocol.auto.description%", + "%node.protocol.inspector.description%", + "%node.protocol.legacy.description%" + ], + "description": "%node.protocol.description%", + "default": "inspector" + }, + "cwd": { + "type": "string", + "description": "%node.launch.cwd.description%", + "default": "${workspaceFolder}" + }, + "processId": { + "type": "string", + "description": "%node.attach.processId.description%", + "default": "${command:PickProcess}" + }, + "port": { + "type": "number", + "description": "%node.port.description%", + "default": 9229 + }, + "address": { + "type": "string", + "description": "%node.address.description%", + "default": "localhost" + }, + "timeout": { + "type": "number", + "description": "%node.timeout.description%", + "default": 10000 + }, + "restart": { + "type": "boolean", + "description": "%node.restart.description%", + "default": true + }, + "sourceMaps": { + "type": "boolean", + "description": "%node.sourceMaps.description%", + "default": true + }, + "outDir": { + "type": [ + "string", + "null" + ], + "deprecationMessage": "%outDir.deprecationMessage%", + "default": null + }, + "outFiles": { + "type": "array", + "markdownDescription": "%outFiles.description%", + "items": { + "type": "string" + }, + "default": [] + }, + "stopOnEntry": { + "type": "boolean", + "description": "%node.stopOnEntry.description%", + "default": true + }, + "localRoot": { + "type": [ + "string", + "null" + ], + "description": "%node.localRoot.description%", + "default": null + }, + "remoteRoot": { + "type": [ + "string", + "null" + ], + "description": "%node.remoteRoot.description%", + "default": null + }, + "smartStep": { + "type": "boolean", + "description": "%smartStep.description%", + "default": true + }, + "skipFiles": { + "type": "array", + "markdownDescription": "%skipFiles.description%", + "items": { + "type": "string" + }, + "default": [] + }, + "showAsyncStacks": { + "type": "boolean", + "description": "%node.showAsyncStacks.description%", + "default": true + }, + "trace": { + "type": [ + "boolean", + "string" + ], + "description": "%trace.description%", + "default": true + }, + "sourceMapPathOverrides": { + "type": "object", + "description": "%node.sourceMapPathOverrides.description%", + "default": { + "webpack:///./~/*": "${workspaceRoot}/node_modules/*", + "webpack:///./*": "${workspaceRoot}/*", + "webpack:///*": "*" + } + }, + "disableOptimisticBPs": { + "type": "boolean", + "description": "%node.disableOptimisticBPs.description%", + "default": true + } + } + } + } + } + ], + "menus": { + "debug/callstack/context": [ + { + "command": "extension.node-debug.toggleSkippingFile", + "group": "navigation", + "when": "inDebugMode && debugType == 'legacy-node' && callStackItemType == 'stackFrame'" + } + ] + } + }, + "activationEvents": [ + "onDebugResolve:legacy-node", + "onCommand:extension.pickNodeProcess", + "onCommand:extension.node-debug.toggleSkippingFile", + "onCommand:extension.node-debug.attachNodeProcess", + "onCommand:extension.node-debug.startAutoAttach" + ], + "resolutions": { + "gulp/**/yargs-parser": "5.0.0-security.0" + }, + "dependencies": { + "glob": "10.3.10", + "minimatch": "9.0.3", + "request-light": "0.7.0", + "source-map": "0.7.4", + "vscode-debugadapter": "1.48.0", + "vscode-nls": "5.2.0" + }, + "devDependencies": { + "@types/mocha": "10.0.6", + "@types/node": "20.10.5", + "@types/vscode": "1.85.0", + "copy-webpack-plugin": "11.0.0", + "del": "7.1.0", + "gulp": "4.0.2", + "gulp-filter": "9.0.1", + "gulp-sourcemaps": "3.0.0", + "gulp-tsb": "4.0.5", + "gulp-tslint": "8.1.4", + "gulp-typescript": "5.0.1", + "gulp-uglify": "3.0.2", + "mocha": "10.2.0", + "ts-loader": "9.5.1", + "tslint-microsoft-contrib": "6.2.0", + "tsutils": "3.21.0", + "typescript": "5.3.3", + "vsce": "1.88.0", + "vscode-debugadapter-testsupport": "1.48.0", + "vscode-debugprotocol": "1.48.0", + "vscode-nls-dev": "4.0.4", + "webpack": "5.89.0", + "webpack-cli": "5.1.4", + "yargs-parser": "21.1.1" + }, + "extensionDependencies": [ + "ms-vscode.node-debug2" + ], + "icon": "images/node-debug-icon.png", + "capabilities": { + "virtualWorkspaces": false, + "untrustedWorkspaces": { + "supported": true + } + } }