diff --git a/examples/electron/package.json b/examples/electron/package.json index e60f272977e61..7aef2cc128c1e 100644 --- a/examples/electron/package.json +++ b/examples/electron/package.json @@ -63,7 +63,7 @@ "bundle": "theia build --mode development", "watch": "concurrently -n compile,bundle \"theiaext watch --preserveWatchOutput\" \"theia build --watch --mode development\"", "start": "theia start --plugins=local-dir:../../plugins", - "start:debug": "yarn start --log-level=debug", + "start:debug": "yarn start --log-level=debug --remote-debugging-port=9222", "test": "electron-mocha --timeout 60000 \"./lib/test/**/*.espec.js\"" }, "devDependencies": { diff --git a/package.json b/package.json index 8ebecb2ab76ff..94a14b995e448 100644 --- a/package.json +++ b/package.json @@ -74,6 +74,8 @@ "publish:check": "node scripts/check-publish.js", "start:browser": "yarn rebuild:browser && yarn --cwd examples/browser start", "start:electron": "yarn rebuild:electron && yarn --cwd examples/electron start", + "debug:browser": "yarn rebuild:browser && yarn --cwd examples/browser start:debug", + "debug:electron": "yarn rebuild:electron && yarn --cwd examples/electron start:debug", "download:plugins": "theia download:plugins" }, "workspaces": [ diff --git a/packages/core/src/node/messaging/ipc-connection-provider.ts b/packages/core/src/node/messaging/ipc-connection-provider.ts index 4ca773bc4675f..cdaa9048c0799 100644 --- a/packages/core/src/node/messaging/ipc-connection-provider.ts +++ b/packages/core/src/node/messaging/ipc-connection-provider.ts @@ -83,9 +83,10 @@ export class IPCConnectionProvider { info: (message: string) => this.logger.info(`[${options.serverName}: ${childProcess.pid}] ${message}`), log: (message: string) => this.logger.info(`[${options.serverName}: ${childProcess.pid}] ${message}`) }); - connection.trace(Trace.Off, { + const traceVerbosity = this.logger.isDebug() ? Trace.Verbose : Trace.Off; + connection.trace(traceVerbosity, { // eslint-disable-next-line @typescript-eslint/no-explicit-any - log: (message: any, data?: string) => this.logger.info(`[${options.serverName}: ${childProcess.pid}] ${message}` + (typeof data === 'string' ? ' ' + data : '')) + log: (message: any, data?: string) => this.logger.debug(`[${options.serverName}: ${childProcess.pid}] ${message}` + (typeof data === 'string' ? ' ' + data : '')) }); return connection; }