• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 Server and 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 Server (Release) and 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 for testing the extension with a local build of the LSP server (in `target/release`)
75      // with all other extensions loaded.
76      "name": "Run With Extensions",
77      "type": "extensionHost",
78      "request": "launch",
79      "runtimeExecutable": "${execPath}",
80      "args": [
81        "--disable-extension", "rust-lang.rust-analyzer",
82        "--extensionDevelopmentPath=${workspaceFolder}/editors/code"
83      ],
84      "outFiles": [
85        "${workspaceFolder}/editors/code/out/**/*.js"
86      ],
87      "preLaunchTask": "Build Server (Release) and Extension",
88      "skipFiles": [
89        "<node_internals>/**/*.js"
90      ],
91      "env": {
92        "__RA_LSP_SERVER_DEBUG": "${workspaceFolder}/target/release/rust-analyzer"
93      }
94    },
95    {
96      // Used to attach LLDB to a running LSP server.
97      // NOTE: Might require root permissions. For this run:
98      //
99      // `echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope`
100      //
101      // Don't forget to set `debug = 2` in `Cargo.toml` before building the server
102
103      "name": "Attach To Server",
104      "type": "lldb",
105      "request": "attach",
106      "program": "${workspaceFolder}/target/debug/rust-analyzer",
107      "pid": "${command:pickMyProcess}",
108      "sourceLanguages": [
109        "rust"
110      ]
111    },
112    {
113      "name": "Run Unit Tests",
114      "type": "extensionHost",
115      "request": "launch",
116      "runtimeExecutable": "${execPath}",
117      "args": [
118          "--extensionDevelopmentPath=${workspaceFolder}/editors/code",
119          "--extensionTestsPath=${workspaceFolder}/editors/code/out/tests/unit" ],
120      "sourceMaps": true,
121      "outFiles": [ "${workspaceFolder}/editors/code/out/tests/unit/**/*.js" ],
122      "preLaunchTask": "Pretest"
123    },
124    {
125      "name": "Win Attach to Server",
126      "type": "cppvsdbg",
127      "processId":"${command:pickProcess}",
128      "request": "attach"
129    }
130  ]
131}
132