Adding more logging to the server

This commit is contained in:
Dirk Baeumer
2017-10-31 10:34:06 +01:00
parent cd8cf29034
commit f0cfd7816e
2 changed files with 14 additions and 5 deletions

View File

@ -14,13 +14,22 @@
"preLaunchTask": "watch:client"
},
{
"name": "Attach to Server",
"name": "Attach to Server 11",
"type": "node",
"request": "attach",
"port": 6010,
"port": 6011,
"sourceMaps": true,
"outFiles": [ "${workspaceRoot}/client/server/**/*.js" ],
"preLaunchTask": "watch:server"
}
},
{
"name": "Attach to Server 12",
"type": "node",
"request": "attach",
"port": 6012,
"sourceMaps": true,
"outFiles": [ "${workspaceRoot}/client/server/**/*.js" ],
"preLaunchTask": "watch:server"
}
]
}

View File

@ -17,13 +17,13 @@ let documents = new TextDocuments();
let workspaceFolder: string;
documents.onDidOpen((event) => {
connection.console.log(`[Server ${workspaceFolder}] Document opened: ${event.document.uri}`);
connection.console.log(`[Server(${process.pid}) ${workspaceFolder}] Document opened: ${event.document.uri}`);
})
documents.listen(connection);
connection.onInitialize((params) => {
workspaceFolder = params.rootUri;
connection.console.log(`Server started for folder: ${workspaceFolder}`);
connection.console.log(`[Server(${process.pid}) ${workspaceFolder}] Started and initialize received`);
return {
capabilities: {
textDocumentSync: {