Skip to content

Commit 63ecd99

Browse files
Merge pull request #749 from brifly/fix-debug-instructions
Improvements to the contributing instructions
2 parents dadde5d + 3a25cf0 commit 63ecd99

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

CONTRIBUTING.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,27 +46,35 @@ All contributions are welcome!
4646
├──── yaml-language-server/
4747
```
4848

49-
3. Run `yarn install` in both directories to initialize `node_modules` dependencies.
49+
3. Open the `vscode-yaml` folder in VSCode, and then add the `yaml-language-server` project to the workspace using `File -> Add Folder to Workspace...`.
5050

51-
4. In `vscode-yaml/webpack.config.js` set the `config.entry.languageserver` property to:
51+
4. Run `yarn install` in both directories to initialize `node_modules` dependencies.
52+
53+
5. In `vscode-yaml/webpack.config.js` set the `config.entry.languageserver` property to:
5254

5355
```js
54-
languageserver: './../yaml-language-server/out/server/src/server.js',
56+
languageserver: './../yaml-language-server/src/server.ts',
5557
```
5658

5759
_This will redirect which YAML LS to use._
5860

59-
5. First run `yarn run compile` in `yaml-language-server` then in `vscode-yaml` directory
61+
6. In `yaml-language-server/.vscode/launch.json` set `outFiles` in the `Attach to server` configuration to:
62+
63+
```js
64+
"outFiles": ["${workspaceFolder}/../vscode-yaml/dist/**/*.js"],
65+
```
6066

61-
6. To run the language server in VSCode, click `View -> Debug`, then from the drop down menu beside the green arrow select `Launch Extension (vscode-yaml)`, click the arrow, and a new VSCode window should load with the YAML LS running.
67+
7. To run the language server in VSCode, click `View -> Debug`, then from the drop down menu beside the green arrow select `Launch Extension (vscode-yaml)`, click the arrow, and a new VSCode window should load with the YAML LS running.
6268

63-
7. To debug the language server in VSCode, from the same drop down menu
69+
8. To debug the language server in VSCode, from the same drop down menu
6470
select
6571
`Attach (yaml-language-server)`, and click the green arrow to start.
6672
Ensure you've opened a YAML file or else the server would have not yet
6773
started.
6874

69-
**Note:** Disable or remove any existing implementations of the YAML Language server from VSCode or there will be conflicts.
75+
**Notes:**
76+
* Disable or remove any existing implementations of the YAML Language server from VSCode or there will be conflicts.
77+
* If you still have issues you can also try changing the debug port for the language server. To do this change the port in the `Attach to server` configuration to another value in `yaml-language-server/.vscode/launch.json`, then change update the port in `debugOptions` (`'--inspect=6009'`) to the new port in the file `vscode-yaml/src/node/yamlClientMain.ts`.
7078

7179
##### Developing the server side
7280

0 commit comments

Comments
 (0)