You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/lsp.md
+38Lines changed: 38 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@ sequenceDiagram
25
25
```
26
26
27
27
## Language Server Debugging
28
+
If you want to connect a local version of language-servers to aws-toolkit-vscode, follow these steps:
28
29
29
30
1. Clone https://github.com/aws/language-servers.git and set it up in the same workspace as this project by cmd+shift+p and "add folder to workspace" and selecting the language-servers folder that you just cloned. Your VS code folder structure should look like below.
30
31
@@ -55,6 +56,43 @@ sequenceDiagram
55
56
5. Use the `Launch LSP with Debugging` configuration and set breakpoints in VSCode or the language server, Once you run "Launch LSP with Debugging" a new window should start, wait for the plugin to show up there. Then go to the run menu again and run "Attach to Language Server (amazonq)" after this you should be able to add breakpoints in the LSP code.
56
57
6. (Optional): Enable `"amazonq.trace.server": "on"` or `"amazonq.trace.server": "verbose"` in your VSCode settings to view detailed log messages sent to/from the language server. These log messages will show up in the "Amazon Q Language Server" output channel
57
58
59
+
### Breakpoints Work-Around
60
+
If the breakpoints in your language-servers project remain greyed out and do not trigger when you run `Launch LSP with Debugging`, your debugger may be attaching to the language server before it has launched. You can follow the work-around below to avoid this problem. If anyone fixes this issue, please remove this section.
61
+
1. Set your breakpoints and click `Launch LSP with Debugging`
62
+
2. Once the debugging session has started, click `Launch LSP with Debugging` again, then `Cancel` on any pop-ups that appear
63
+
3. On the debug panel, click `Attach to Language Server (amazonq)` next to the red stop button
64
+
4. Click `Launch LSP with Debugging` again, then `Cancel` on any pop-ups that appear
65
+
66
+
## Language Server Runtimes Debugging
67
+
If you want to connect a local version of language-server-runtimes to aws-toolkit-vscode, follow these steps:
68
+
69
+
1. Clone https://github.com/aws/language-server-runtimes.git and set it up in the same workspace as this project by cmd+shift+p and "add folder to workspace" and selecting the language-server-runtimes folder that you just cloned. Your VS code folder structure should look like below.
70
+
71
+
```
72
+
/aws-toolkit-vscode
73
+
/toolkit
74
+
/core
75
+
/amazonq
76
+
/language-server-runtimes
77
+
```
78
+
2. Inside of the language-server-runtimes project run:
79
+
```
80
+
npm install
81
+
npm run compile
82
+
cd runtimes
83
+
npm run prepub
84
+
cd out
85
+
npm link
86
+
cd ../../types
87
+
npm link
88
+
```
89
+
If you get an error running `npm run prepub`, you can instead run `npm run prepub:copyFiles` to skip cleaning and testing.
90
+
3. Inside of aws-toolkit-vscode run:
91
+
```
92
+
npm install
93
+
npm link @aws/language-server-runtimes @aws/language-server-runtimes-types
94
+
```
95
+
58
96
## Amazon Q Inline Activation
59
97
60
98
- In order to get inline completion working you must open a supported file type defined in CodewhispererInlineCompletionLanguages in `packages/amazonq/src/app/inline/completion.ts`
0 commit comments