Need to restart Vs Code for changes to be taken into account
See original GitHub issueDescription After modifying a keyword by for example adding or removing an argument I need to restart VsCode in order for the changes to be taken into account by RobotFramework LS. Before, the changes would be “known” instantly by to linter.
For the past few weeks I have often had a pop from the extension announcing problems and inviting me to consult them in the output tab but it was not creating problems in my everyday use. Now it is really bothering me and preventing me from using the tool normally.
Versions:
- OS: Windows 10 Professionnel - 21H2
 - Robot Framework Version: 4.1.3
 - Robot Framework Language Server Version: v0.42.0
 - Python 3.7.6
 - VSCode 1.65.2
 
Logs Here is a piece of log that I receive…
=============================== END Thread Dump ===============================
lsp: 2022-03-28 16:28:43 UTC pid: 21620 - MainThread - INFO - robocorp_ls_core.jsonrpc.monitor
Cancelled: Message: id: 63, method: textDocument/semanticTokens/full
lsp: 2022-03-28 16:28:43 UTC pid: 21620 - ThreadPoolExecutor-0_1 - INFO - robotframework_ls.robotframework_ls_impl
Cancelled handling: <function RobotFrameworkLanguageServer._threaded_api_request_no_doc at 0x0000022FFD5BB168>
lsp: 2022-03-28 16:28:43 UTC pid: 21620 - MainThread - INFO - robocorp_ls_core.jsonrpc.monitor
Cancelled: Message: id: 64, method: textDocument/semanticTokens/full
lsp: 2022-03-28 16:28:43 UTC pid: 21620 - ThreadPoolExecutor-0_6 - INFO - robotframework_ls.robotframework_ls_impl
Cancelled handling: <function RobotFrameworkLanguageServer._threaded_api_request_no_doc at 0x0000022FFD5BB168>
server-api: 2022-03-28 16:28:43 UTC pid: 12496 - MainThread - INFO - robocorp_ls_core.jsonrpc.monitor
Cancelled: Message: id: 66, method: textDocument/semanticTokens/full
server-api: 2022-03-28 16:28:43 UTC pid: 12496 - MainThread - INFO - robocorp_ls_core.jsonrpc.endpoint
Received cancel notification for unknown message id 67
lsp: 2022-03-28 16:32:07 UTC pid: 21620 - MainThread - INFO - robocorp_ls_core.jsonrpc.monitor
Cancelled: Message: id: 82, method: textDocument/hover
lsp: 2022-03-28 16:49:41 UTC pid: 21620 - MainThread - INFO - robocorp_ls_core.jsonrpc.monitor
Cancelled: Message: id: 98, method: textDocument/hover
lsp: 2022-03-28 16:54:38 UTC pid: 21620 - MainThread - INFO - robocorp_ls_core.jsonrpc.endpoint
Ignoring notification for unknown method $/setTrace
lsp: 2022-03-28 16:55:02 UTC pid: 21620 - MainThread - INFO - robocorp_ls_core.jsonrpc.monitor
Cancelled: Message: id: 111, method: textDocument/hover
lsp: 2022-03-28 16:55:02 UTC pid: 21620 - ThreadPoolExecutor-0_3 - INFO - robotframework_ls.robotframework_ls_impl
Cancelled handling: <function RobotFrameworkLanguageServer._threaded_api_request at 0x0000022FFD5BB048>
server-api: 2022-03-28 16:55:02 UTC pid: 21376 - MainThread - INFO - robocorp_ls_core.jsonrpc.monitor
Cancelled: Message: id: 72, method: hover
lsp: 2022-03-28 16:57:02 UTC pid: 21620 - MainThread - INFO - robocorp_ls_core.jsonrpc.monitor
Cancelled: Message: id: 195, method: textDocument/foldingRange
lsp: 2022-03-28 16:57:03 UTC pid: 21620 - MainThread - INFO - robocorp_ls_core.jsonrpc.monitor
Cancelled: Message: id: 204, method: textDocument/foldingRange
lsp: 2022-03-28 16:57:03 UTC pid: 21620 - ThreadPoolExecutor-0_4 - INFO - robotframework_ls.robotframework_ls_impl
Cancelled handling: <function RobotFrameworkLanguageServer._threaded_api_request at 0x0000022FFD5BB048>
server-api: 2022-03-28 16:57:03 UTC pid: 12496 - MainThread - INFO - robocorp_ls_core.jsonrpc.endpoint
Received cancel notification for unknown message id 178
lsp: 2022-03-28 16:57:34 UTC pid: 21620 - MainThread - INFO - robocorp_ls_core.jsonrpc.endpoint
Received cancel notification for unknown message id 298
server-api: 2022-03-28 16:59:10 UTC pid: 13832 - MainThread - INFO - robocorp_ls_core.jsonrpc.monitor
Cancelled: Message: id: 164, method: lint
lsp: 2022-03-28 16:59:11 UTC pid: 21620 - MainThread - INFO - robocorp_ls_core.jsonrpc.monitor
Cancelled: Message: id: 460, method: textDocument/hover
server-api: 2022-03-28 16:59:38 UTC pid: 12496 - ThreadPoolExecutor-0_5 - INFO - robocorp_ls_core.robotidy_wrapper
Using vendored robotidy
server-api: 2022-03-28 16:59:38 UTC pid: 12496 - ThreadPoolExecutor-0_5 - INFO - robocorp_ls_core.robotidy_wrapper
robotidy module: <module 'robotidy' from 'c:\\Users\\roberto.baggio\\.vscode\\extensions\\robocorp.robotframework-lsp-0.42.0\\src\\robotframework_ls\\vendored\\robocorp_ls_core\\libs\\robotidy_lib\\robotidy\\__init__.py'>
lsp: 2022-03-28 16:59:42 UTC pid: 21620 - MainThread - EXCEPTION - robocorp_ls_core.jsonrpc.endpoint
Failed to handle request 492
Traceback (most recent call last):
  File "c:\Users\roberto.baggio\.vscode\extensions\robocorp.robotframework-lsp-0.42.0\src\robotframework_ls\vendored\robocorp_ls_core\jsonrpc\endpoint.py", line 142, in consume
    message["id"], message["method"], message.get("params")
  File "c:\Users\roberto.baggio\.vscode\extensions\robocorp.robotframework-lsp-0.42.0\src\robotframework_ls\vendored\robocorp_ls_core\jsonrpc\endpoint.py", line 277, in _handle_request
    handler_result = handler(params)
  File "c:\Users\roberto.baggio\.vscode\extensions\robocorp.robotframework-lsp-0.42.0\src\robotframework_ls\vendored\robocorp_ls_core\jsonrpc\dispatchers.py", line 49, in _handler
    return method(**(params or {}))
  File "c:\Users\roberto.baggio\.vscode\extensions\robocorp.robotframework-lsp-0.42.0\src\robotframework_ls\robotframework_ls_impl.py", line 586, in m_text_document__formatting
    raise RuntimeError("Code formatting timed-out.")
RuntimeError: Code formatting timed-out.
[Error - 16:59:42] Request textDocument/formatting failed.
  Message: RuntimeError: Code formatting timed-out.
  Code: -32602 
[object Object]
server-api: 2022-03-28 16:59:42 UTC pid: 12496 - ThreadPoolExecutor-0_0 - INFO - robocorp_ls_core.robotidy_wrapper
robotidy module: <module 'robotidy' from 'c:\\Users\\roberto.baggio\\.vscode\\extensions\\robocorp.robotframework-lsp-0.42.0\\src\\robotframework_ls\\vendored\\robocorp_ls_core\\libs\\robotidy_lib\\robotidy\\__init__.py'>
server-api: 2022-03-28 16:59:43 UTC pid: 12496 - Thread-5 - CRITICAL - robocorp_ls_core.jsonrpc.endpoint
===============================================================================
Slow request (already took: 5s). Showing thread dump.
================================= Thread Dump =================================
-------------------------------------------------------------------------------
 Thread <Thread(ThreadPoolExecutor-0_5, started daemon 15768)>
self: <difflib.SequenceMatcher object at 0x000001E1888E8108>
 File "C:\Users\roberto.baggio\AppData\Local\Programs\Python\Python37\lib\threading.py", line 890, in _bootstrap
   self._bootstrap_inner()
 File "C:\Users\roberto.baggio\AppData\Local\Programs\Python\Python37\lib\threading.py", line 926, in _bootstrap_inner
   self.run()
 File "C:\Users\roberto.baggio\AppData\Local\Programs\Python\Python37\lib\threading.py", line 870, in run
   self._target(*self._args, **self._kwargs)
 File "C:\Users\roberto.baggio\AppData\Local\Programs\Python\Python37\lib\concurrent\futures\thread.py", line 80, in _worker
   work_item.run()
 File "C:\Users\roberto.baggio\AppData\Local\Programs\Python\Python37\lib\concurrent\futures\thread.py", line 57, in run
   result = self.fn(*self.args, **self.kwargs)
 File "c:\Users\roberto.baggio\.vscode\extensions\robocorp.robotframework-lsp-0.42.0\src\robotframework_ls\vendored\robocorp_ls_core\jsonrpc\endpoint.py", line 263, in _call_checking_time
   return func(**kwargs)
 File "c:\Users\roberto.baggio\.vscode\extensions\robocorp.robotframework-lsp-0.42.0\src\robotframework_ls\server_api\server.py", line 581, in _threaded_code_format
   return [x.to_dict() for x in create_text_edit_from_diff(text, new_contents)]
 File "c:\Users\roberto.baggio\.vscode\extensions\robocorp.robotframework-lsp-0.42.0\src\robotframework_ls\impl\formatting.py", line 38, in create_text_edit_from_diff
   for tag, i1, i2, j1, j2 in s.get_opcodes():
 File "C:\Users\roberto.baggio\AppData\Local\Programs\Python\Python37\lib\difflib.py", line 550, in get_opcodes
   for ai, bj, size in self.get_matching_blocks():
 File "C:\Users\roberto.baggio\AppData\Local\Programs\Python\Python37\lib\difflib.py", line 479, in get_matching_blocks
   i, j, k = x = self.find_longest_match(alo, ahi, blo, bhi)
 File "C:\Users\roberto.baggio\AppData\Local\Programs\Python\Python37\lib\difflib.py", line 410, in find_longest_match
   k = newj2len[j] = j2lenget(j-1, 0) + 1
=============================== END Thread Dump ===============================
server-api: 2022-03-28 17:00:25 UTC pid: 12496 - ThreadPoolExecutor-0_3 - INFO - robocorp_ls_core.robotidy_wrapper
robotidy module: <module 'robotidy' from 'c:\\Users\\roberto.baggio\\.vscode\\extensions\\robocorp.robotframework-lsp-0.42.0\\src\\robotframework_ls\\vendored\\robocorp_ls_core\\libs\\robotidy_lib\\robotidy\\__init__.py'>
lsp: 2022-03-28 17:00:36 UTC pid: 21620 - MainThread - INFO - robocorp_ls_core.jsonrpc.monitor
Cancelled: Message: id: 546, method: textDocument/hover
lsp: 2022-03-28 17:00:36 UTC pid: 21620 - ThreadPoolExecutor-0_0 - INFO - robotframework_ls.robotframework_ls_impl
Cancelled handling: <function RobotFrameworkLanguageServer._threaded_api_request at 0x0000022FFD5BB048>
server-api: 2022-03-28 17:00:36 UTC pid: 21376 - MainThread - INFO - robocorp_ls_core.jsonrpc.monitor
Cancelled: Message: id: 316, method: hover
server-api: 2022-03-28 17:20:36 UTC pid: 12496 - ThreadPoolExecutor-0_4 - INFO - robocorp_ls_core.robotidy_wrapper
robotidy module: <module 'robotidy' from 'c:\\Users\\roberto.baggio\\.vscode\\extensions\\robocorp.robotframework-lsp-0.42.0\\src\\robotframework_ls\\vendored\\robocorp_ls_core\\libs\\robotidy_lib\\robotidy\\__init__.py'>
lsp: 2022-03-28 17:20:48 UTC pid: 21620 - MainThread - INFO - robocorp_ls_core.jsonrpc.monitor
Cancelled: Message: id: 733, method: textDocument/hover
server-api: 2022-03-28 17:22:41 UTC pid: 12496 - ThreadPoolExecutor-0_7 - INFO - robocorp_ls_core.robotidy_wrapper
robotidy module: <module 'robotidy' from 'c:\\Users\\roberto.baggio\\.vscode\\extensions\\robocorp.robotframework-lsp-0.42.0\\src\\robotframework_ls\\vendored\\robocorp_ls_core\\libs\\robotidy_lib\\robotidy\\__init__.py'>
server-api: 2022-03-28 17:22:52 UTC pid: 12496 - ThreadPoolExecutor-0_2 - INFO - robocorp_ls_core.robotidy_wrapper
robotidy module: <module 'robotidy' from 'c:\\Users\\roberto.baggio\\.vscode\\extensions\\robocorp.robotframework-lsp-0.42.0\\src\\robotframework_ls\\vendored\\robocorp_ls_core\\libs\\robotidy_lib\\robotidy\\__init__.py'>
lsp: 2022-03-28 17:22:53 UTC pid: 21620 - MainThread - INFO - robocorp_ls_core.jsonrpc.monitor
Cancelled: Message: id: 771, method: textDocument/hover
server-api: 2022-03-28 17:23:06 UTC pid: 12496 - ThreadPoolExecutor-0_6 - INFO - robocorp_ls_core.robotidy_wrapper
robotidy module: <module 'robotidy' from 'c:\\Users\\roberto.baggio\\.vscode\\extensions\\robocorp.robotframework-lsp-0.42.0\\src\\robotframework_ls\\vendored\\robocorp_ls_core\\libs\\robotidy_lib\\robotidy\\__init__.py'>
lsp: 2022-03-28 17:24:30 UTC pid: 21620 - MainThread - INFO - robocorp_ls_core.jsonrpc.endpoint
Ignoring notification for unknown method $/setTrace
lsp: 2022-03-28 17:24:33 UTC pid: 21620 - MainThread - INFO - robocorp_ls_core.jsonrpc.endpoint
Ignoring notification for unknown method $/setTrace
lsp: 2022-03-28 17:24:33 UTC pid: 21620 - MainThread - INFO - robocorp_ls_core.jsonrpc.endpoint
Ignoring notification for unknown method $/setTrace
lsp: 2022-03-28 17:34:03 UTC pid: 21620 - MainThread - INFO - robocorp_ls_core.jsonrpc.endpoint
Ignoring notification for unknown method $/setTrace
Issue Analytics
- State:
 - Created a year ago
 - Comments:10
 
Top Results From Across the Web
How to restart VScode after editing extension's config?
Execute the workbench.action.reloadWindow command. There are some ways to do so: Open the command palette ( Ctrl + Shift + P ) and...
Read more >Settings Sync in Visual Studio Code
You can always change what is synced via the Settings Sync: Configure command or by opening the Manage gear menu, selecting Settings Sync...
Read more >Visual Studio Code Frequently Asked Questions
Visual Studio Code FAQ. Our docs contain a Common questions section as needed for specific topics. We've captured items here that don't fit...
Read more >User and Workspace Settings - Visual Studio Code
Notice that when you have changed the setting value to be different than the default ... Turn on Settings Sync command in the...
Read more >If options change requires VS restart to take effect, raise a ...
I've noticed if you change Options from Tools-> Options, they will take effect after restarting Visual Studio. It has costed me, when I...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Ok, I’ve pushed
0.43.2with a fix which I believe has fixed this, so, I’m closing this issue.If you can still reproduce it, please reopen it.
As a note, I got another report and it seems that on some cases even
0.43.0can have the issue.– the issue being that the uri sent from VSCode for invalidation is something as
file:///c%3A/some_path, whereas the internal uri is something asfile:///c:/some_path.So, I’ll probably do a bugfix release later today with a new fix for this.