]> git.lizzy.rs Git - rust.git/blob - .vscode/launch.json
Merge #4111 #4112
[rust.git] / .vscode / launch.json
1 {
2   // Use IntelliSense to learn about possible attributes.
3   // Hover to view descriptions of existing attributes.
4   // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
6   // NOTE: --disable-extensions
7   // Disable all installed extensions to increase performance of the debug instance
8   // and prevent potential conflicts with other installed extensions.
9
10   "version": "0.2.0",
11   "configurations": [
12     {
13       // Used for testing the extension with the installed LSP server.
14       "name": "Run Installed Extension",
15       "type": "extensionHost",
16       "request": "launch",
17       "runtimeExecutable": "${execPath}",
18       "args": [
19         // "--user-data-dir=${workspaceFolder}/target/code",
20         "--disable-extensions",
21         "--extensionDevelopmentPath=${workspaceFolder}/editors/code"
22       ],
23       "outFiles": [
24         "${workspaceFolder}/editors/code/out/**/*.js"
25       ],
26       "preLaunchTask": "Build Extension",
27       "skipFiles": [
28         "<node_internals>/**/*.js"
29       ]
30     },
31     {
32       // Used for testing the extension with a local build of the LSP server (in `target/debug`).
33       "name": "Run Extension (Debug Build)",
34       "type": "extensionHost",
35       "request": "launch",
36       "runtimeExecutable": "${execPath}",
37       "args": [
38         "--disable-extensions",
39         "--extensionDevelopmentPath=${workspaceFolder}/editors/code"
40       ],
41       "outFiles": [
42         "${workspaceFolder}/editors/code/out/**/*.js"
43       ],
44       "preLaunchTask": "Build Extension",
45       "skipFiles": [
46         "<node_internals>/**/*.js"
47       ],
48       "env": {
49         "__RA_LSP_SERVER_DEBUG": "${workspaceFolder}/target/debug/rust-analyzer"
50       }
51     },
52     {
53       // Used for testing the extension with a local build of the LSP server (in `target/release`).
54       "name": "Run Extension (Release Build)",
55       "type": "extensionHost",
56       "request": "launch",
57       "runtimeExecutable": "${execPath}",
58       "args": [
59         "--disable-extensions",
60         "--extensionDevelopmentPath=${workspaceFolder}/editors/code"
61       ],
62       "outFiles": [
63         "${workspaceFolder}/editors/code/out/**/*.js"
64       ],
65       "preLaunchTask": "Build Extension",
66       "skipFiles": [
67         "<node_internals>/**/*.js"
68       ],
69       "env": {
70         "__RA_LSP_SERVER_DEBUG": "${workspaceFolder}/target/release/rust-analyzer"
71       }
72     },
73     {
74       // Used to attach LLDB to a running LSP server.
75       // NOTE: Might require root permissions. For this run:
76       //
77       // `echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope`
78       //
79       // Don't forget to set `debug = 2` in `Cargo.toml` before building the server
80
81       "name": "Attach To Server",
82       "type": "lldb",
83       "request": "attach",
84       "program": "${workspaceFolder}/target/debug/rust-analyzer",
85       "pid": "${command:pickMyProcess}",
86       "sourceLanguages": [
87         "rust"
88       ]
89     },
90   ]
91 }