1
1
# CONTRIBUTING
2
2
3
- ## Manually testing a change
3
+ ## Testing changes
4
+
5
+ ### Tracing LSP requests and responses
6
+
7
+ LSP server tracing (logging) can be controlled through the ` ruby lsp.trace.server ` config key in the
8
+ ` .vscode/settings.json ` config file.
9
+
10
+ Possible values are:
11
+
12
+ - ` off ` : no tracing
13
+ - ` messages ` : display requests and responses notifications
14
+ - ` verbose ` : display each request and response as JSON
15
+
16
+ ### Manually testing a change
4
17
5
18
There are a few options for manually testing changes to Ruby LSP:
6
19
@@ -14,9 +27,7 @@ gem "ruby-lsp", path: "../../Shopify/ruby-lsp"
14
27
15
28
With both approaches, there is a risk of 'breaking' your local development experience, so keep an eye on the Ruby LSP output panel for exceptions as your make changes.
16
29
17
- You can also refer to the advice about [ Debugging and Tracing] ( https://github.com/Shopify/vscode-ruby-lsp#debugging ) .
18
-
19
- ## Running the test suite
30
+ ### Running the test suite
20
31
21
32
The test suite can be executed by running
22
33
``` shell
@@ -30,7 +41,7 @@ VERBOSE=1 bin/test
30
41
bin/test test/requests/diagnostics_expectations_test.rb test_diagnostics__def_bad_formatting
31
42
```
32
43
33
- ## Expectation testing
44
+ ### Expectation testing
34
45
35
46
To simplify the way we run tests over different pieces of Ruby code, we use a custom expectations test framework against
36
47
a set of Ruby fixtures.
99
110
2 . Set breakpoints in the code as desired
100
111
3 . Click the debug button on top of test examples
101
112
102
- ## Debugging Running Ruby LSP Process
113
+ ## Live debugging
103
114
104
- 1 . Open [ vscode-ruby-lsp ] ( https://github.com/Shopify/vscode-ruby-lsp ) in VS Code
105
- 2 . Under ` Run and Debug ` , select ` Run extension ` and click the start button (or press F5)
106
- 3 . The extension host window opened will be running a Ruby LSP process with the debugger attached. To start debugging
107
- the live process, go under ` Run and Debug ` , select ` Attach to existing server ` and click the start button (or
108
- press F5)
109
- 4 . Add breakpoints and perform the actions necessary for triggering the requests you wish to debug
115
+ 1 . Under ` Run and Debug ` , select ` Run extension ` and click the start button (or press F5)
116
+ 2 . The extension host window opened will be running the development version of the VS Code extension. Putting break
117
+ points in the extension code will allow debugging
118
+ 3 . If you wish to debug the server process, go under ` Run and Debug ` in the extension host window,
119
+ select ` Attach to existing server ` and click the start button (or press F5)
120
+ 3 . Add breakpoints and perform the actions necessary for triggering the requests you wish to debug
110
121
111
122
## Screen Captures
112
123
0 commit comments