Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make IPC debug tracing configurable #9602

Merged
merged 1 commit into from
Jun 18, 2021

Conversation

alvsan09
Copy link
Contributor

This change associates IPC tracing with the logger.debug method,
therefore enabling debugging enables IPC tracing.

Additionally, two new scripts are added to the top package.json, which can
be called as follows:

yarn debug:electron
yarn debug:browser

these enable starting of the electron and browser application examples in
debug mode.

Signed-off-by: Alvaro Sanchez-Leon [email protected]

What it does

Adds two new scripts to start the example applications (electron and browser) in debug mode,
it additionally associates IPC traces to debug mode.

How to test

  1. Start the electron application in debug mode and verify that debug traces are present

yarn debug:electron

  1. Modify a file present in the workspace and check that IPC traces are displayed e.g.
    image
  2. close the theia example application
  3. Start the electron application (no debugging mode), repeat step 2. and make sure no debug traces appear.

yarn start:electron

Repeat the steps above replacing the yarn electron scripts for the corresponding browser scripts
i.e.

yarn debug:browser
yarn start:browser

Review checklist

Reminder for reviewers

@alvsan09 alvsan09 force-pushed the asl/enable-ipc-tracing branch from 4ebc91a to f3c546b Compare June 17, 2021 11:48
This change associates IPC tracing with the logger.debug method,
therefore enabling debugging enables IPC tracing.

Additionally, two new scripts are added to the top package.json to
enable starting of the browser and electron application examples in
debug mode.

Signed-off-by: Alvaro Sanchez-Leon <[email protected]>
@alvsan09 alvsan09 force-pushed the asl/enable-ipc-tracing branch from f3c546b to cfd1383 Compare June 18, 2021 13:31
@vince-fugnitto vince-fugnitto added the logging issues related to logging label Jun 18, 2021
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirmed that the tracing works at the ipc level (filesystem and git) with the changes.

  • yarn start:electron: no debug logs present.
  • yarn debug:electron: debug logs are present on the backend.
  • yarn start:browser: no debug logs present.
  • yarn debug:browser: debug logs are present on the backend.

An example log is the following:

root DEBUG [git-locator: 11545] Sending request 'locate - (0)'. Params: [
    "/Users/vincentfugnitto/workspace/theia",
    {}
]

I'll let others review as well to see if they have any feedback.

@paul-marechal paul-marechal merged commit 4c9b8b8 into eclipse-theia:master Jun 18, 2021
@vince-fugnitto vince-fugnitto deleted the asl/enable-ipc-tracing branch June 18, 2021 19:28
@vince-fugnitto vince-fugnitto added this to the 1.15.0 milestone Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
logging issues related to logging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants