From 7767fcb8d2147abb5d8bc80b537353206da5faed Mon Sep 17 00:00:00 2001 From: "Samuel D. Leslie" Date: Tue, 19 Mar 2019 10:47:00 +1100 Subject: [PATCH] Exclude ParentProcessWatcher by default Signed-off-by: Samuel D. Leslie --- src/javaServerStarter.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/javaServerStarter.ts b/src/javaServerStarter.ts index 60d3437c..20663e4c 100644 --- a/src/javaServerStarter.ts +++ b/src/javaServerStarter.ts @@ -1,6 +1,7 @@ import { workspace } from 'vscode' import { Executable, ExecutableOptions } from 'vscode-languageclient'; import { RequirementsData } from './requirements'; +import * as os from 'os'; import * as path from 'path'; const glob = require('glob'); @@ -27,6 +28,12 @@ function prepareParams(requirements: RequirementsData): string[] { //params.push('-agentlib:jdwp=transport=dt_socket,server=y,address=1054'); } let vmargs = workspace.getConfiguration("xml").get("server.vmargs", ''); + if (os.platform() == 'win32') { + const watchParentProcess = '-DwatchParentProcess='; + if (vmargs.indexOf(watchParentProcess) < 0) { + params.push(watchParentProcess + 'false'); + } + } parseVMargs(params, vmargs); let server_home: string = path.resolve(__dirname, '../../server'); let launchersFound: Array = glob.sync('**/org.eclipse.lsp4xml-uber.jar', { cwd: server_home });