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

trace the debug adapter protocol messages #1023

Merged
merged 1 commit into from Oct 30, 2019

Conversation

@marek1840
Copy link
Collaborator

marek1840 commented Oct 28, 2019

closes #1022

Previously the dap messages were were not being traced.
Now, we trace them on both ends in: dap-client.trace.json and tap-server.trace.json files

@marek1840 marek1840 requested a review from tgodzik Oct 28, 2019
override def cancel(): Unit = endpoint.cancel()

private def log(direction: Direction, message: Message): Unit = {
logger.println(s"[Trace][$time] $direction ${typeOf(message)}:")

This comment has been minimized.

Copy link
@tgodzik

tgodzik Oct 28, 2019

Collaborator

Does it work with the inspector tool? It would be nice to keep it compatible.

This comment has been minimized.

Copy link
@marek1840

marek1840 Oct 30, 2019

Author Collaborator

Sadly, no - the format is too much of a hassle to implement it manually. Reusing the implementation present in the lsp4j.jsonrpc library is also not viable because it is tightly coupled with their launcher implementation.

At one point we might want to change the format to accomodate the inspector but let's delay it for now as it is better to have some logs than none at all.

Copy link
Collaborator

tgodzik left a comment

Just one small comment, otherwise it's ok.

@marek1840 marek1840 merged commit c469de6 into scalameta:master Oct 30, 2019
8 checks passed
8 checks passed
Linux unit tests
Details
Sbt integration
Details
Maven integration
Details
Gradle integration
Details
Mill integration
Details
Slow tests
Details
Scala cross tests
Details
Scalafmt/Scalacheck/Docs
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.