Ask A Question

Notifications

You’re not receiving notifications from this thread.

Debugging Questions

Michael Bradford asked in General

Hello,

I am trying to help out an open source project that I use. I found an issue and the developer has asked me to help debug the javascript but I'm a javascript hack and not sure how to do it.

The project is coc-tailwindcss
The plugin works in one project but not the other. Here's the issue: https://github.com/iamcco/coc-tailwindcss/issues/22
The developer says the LSP init fail, debug the error at line: https://github.com/iamcco/coc-tailwindcss/blob/master/lsp/tailwindcss-language-server/dist/index.js#L7134
The developer asked me "Use console.log to print info to output channel or follow https://github.com/neoclide/coc.nvim/wiki/Debug-language-server"

I have two questions:
The developer wants the console.log() on 7134. Exactly where in the code should I put it and what variable should I use?
I'm assuming that the output would be in :CocCommand workspace.showOutput but I'm not sure. Am I right? Is there another spot to output?

Best regards.

Reply

Hello,

I could not find any solution. Can you help me?

1 2020-03-27T11: 47: 28.391 INFO (pid: 19730) [services] - registered service "eslint langserver"
2 2020-03-27T11: 47: 28.740 INFO (pid: 19730) [plugin] - coc 0.0.77-322876fe15 initialized with node: v8.17.0
3 2020-03-27T11: 47: 28.751 INFO (pid: 19730) [language-client-index] - cSpell started with 19748
4 2020-03-27T11: 48: 31.262 ERROR (pid: 19730) [events] - Handler of BufEnter caused more than 500ms async () => {
5 if (this.timer)
6 clearTimeout (this.timer);
7 if (! This.enabled ||! This.config.locationlist)
8 return;
9 let doc = await workspace_1.default.document;
10 if (! Doc || doc.buftype == 'quickfix')
11 return;
12 if (this.shouldValidate (doc)) (
13 let refreshed = this.refreshBuffer (doc.uri);
14 if (refreshed)
15 return;
16}
17 let curr = await nvim.eval (getloclist (win_getid (), {'title': 1}));
18 if (curr.title && curr.title.indexOf ('Diagnostics of coc')! = -1) (
19 await nvim.eval (setloclist (win_getid (), [], 'f'));
20}
21}
22 2020-03-27T11: 48: 31.706 INFO (pid: 19730) [language-client-index] - tailwindCS started with 19995
23 2020-03-27T11: 48: 54.501 INFO (pid: 19730) [services] - https://19216801.win/ https://routerlogin.cloud/ https://192168101.red/
24 2020-03-27T11: 48: 54.501 INFO (pid: 19730) [services] - registered service "Json language server"
25 2020-03-27T11: 48: 54.501 INFO (pid: 19730) [services] - Json language server state change: stopped => starting
26 2020-03-27T11: 48: 54.506 INFO (pid: 19730) [language-client-index] - json started with 20011
27 2020-03-27T11: 48: 54.665 INFO (pid: 19730) [services] - Json language server state change: starting => running
28 2020-03-27T11: 48: 54.674 INFO (pid: 19730) [services] - service Json language server started
29 2020-03-27T11: 48: 56.839 INFO (pid: 19730) [services] - registered service "Ruby Language Server"
30 2020-03-27T11: 49: 28.941 INFO (pid: 19730) [completion-complete] - Results from: buffer
31 2020-03-27T11: 49: 39.928 INFO (pid: 19730) [completion-complete] - Results from: around, buffer
32 2020-03-27T11: 49: 52.244 INFO (pid: 19730) [completion-complete] - Results from: buffer

Best regards.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 79,047+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

    © 2023 GoRails, LLC. All rights reserved.