Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Inspector cannot open trace from tslint #10

Closed
octref opened this issue Jun 26, 2018 · 3 comments
Closed

Inspector cannot open trace from tslint #10

octref opened this issue Jun 26, 2018 · 3 comments
Assignees

Comments

@octref
Copy link
Contributor

octref commented Jun 26, 2018

From @egamma on June 19, 2018 14:36

@octref the attached file does not open in the inspector

tslint-log.txt

image

The format looks OK to me. The tool should at least show the error to the user.

Copied from original issue: octref/lsp-inspector#10

@octref
Copy link
Contributor Author

octref commented Jun 26, 2018

That's because everything is dumped into the output channel. The input you had was of this form:

[Trace - 4:21:27 PM] Sending request 'initialize - (0)'.
Params: {

}


Debugger listening on ws://127.0.0.1:6010/0956172b-cae0-49f0-9e99-af55cc1f5043
For help see https://nodejs.org/en/docs/inspector
[Trace - 4:21:28 PM] Received response 'initialize - (0)' in 673ms.
Result: {
    "capabilities": {
        "textDocumentSync": 1,
        "codeActionProvider": true
    }
}


[Info  - 4:21:28 PM] Linter is running.
[Trace - 4:21:28 PM] Sending notification 'initialized'.
Params: {}


[Trace - 4:21:28 PM] Sending notification 'workspace/didChangeConfiguration'.

The two lines on debugger come from --inspect. I can handle the [Info] line and make the web app show an error.

@octref octref self-assigned this Jun 26, 2018
@octref
Copy link
Contributor Author

octref commented Jun 26, 2018

From @egamma on June 20, 2018 6:29

@octref the log parser should be more robust so that I do not have to manually edit the log output. The parser should only attempt to parse trace messages and skip over other output to stdout, like --inspect. It appears that the trace messages have a well defined format that can be distinguished from random output.

@octref
Copy link
Contributor Author

octref commented Jun 26, 2018

This is handled fine now. I'll create a new issue for showing parsing error.

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant