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/Configuration.md
+84-5Lines changed: 84 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,18 +4,97 @@ title: Configuration
4
4
permalink: /configuration/
5
5
nav_order: 4
6
6
---
7
-
# Configuration
7
+
8
+
# Configuration
8
9
9
10
VS Code settings enable you to customize various aspects of its function. The InterSystems extensions provide settings used to configure VS Code for ObjectScript development.
10
11
12
+
{: #code-configuration-basic}
13
+
14
+
## Basic Configuration
15
+
16
+
VS Code has a concept of a workspace, which is a set of directories you want to use when you're working on a particular project. In the simplest setup when you are working within a single directory, a VS Code workspace is just the root folder of your project. In this case you keep your settings in two files inside a `.vscode` directory located at the root of your project. Those two files are `settings.json`, which contains most configuration settings, and `launch.json`, which contains debugging configurations.
17
+
18
+
Here is the simplest `settings.json` file contents:
19
+
20
+
{: #code-workspace-simple}
21
+
22
+
```json
23
+
{
24
+
"objectscript.conn": {
25
+
"server": "iris",
26
+
"ns": "USER",
27
+
"active": true,
28
+
"host": "localhost",
29
+
"port": 52773,
30
+
"username": "_SYSTEM"
31
+
}
32
+
}
33
+
```
34
+
35
+
If you need ObjectScript compilation flags other than the default, add an `"objectscript.compileFlags"` property to `settings.json` (more compileFlags options are [covered here](/vscode-objectscript/settings/):
If you want to debug a running process, `launch.json` should have a section like this, which will present a dropdown menu of running processes:
72
+
73
+
{: #code-workspace-simple-debug-process}
74
+
75
+
```json
76
+
{
77
+
"version": "0.2.0",
78
+
"configurations": [
79
+
{
80
+
"type": "objectscript",
81
+
"request": "attach",
82
+
"name": "Example-attach-to-process",
83
+
"processId": "${command:PickProcess}"
84
+
}
85
+
]
86
+
}
87
+
```
88
+
89
+
Note that `"configurations"` is an array, so you can have multiple configurations and choose the one to use from a dropdown menu in the Debug pane.
90
+
11
91
{: #code-workspaces}
12
-
## VS Code Workspaces
13
92
14
-
To work with VS Code, you need to open a workspace. In the simplest setup, a VS Code workspace is just the root folder of your project. Workspace settings and task configurations are stored in the root folder in the `settings.json` file in a folder called `.vscode`. Debugging launch configurations are stored in `launch.json`, also in `.vscode`.
93
+
## VS Code Workspaces
15
94
16
-
If you need to have more than one root folder in a VS Code workspace, use a feature called multi-root workspaces. See [Multi-root Workspaces](https://code.visualstudio.com/docs/editor/multi-root-workspaces) in the VS Code documentation.
95
+
If your project requires more than a single root folder, you need to use a feature called multi-root workspaces. See [Multi-root Workspaces](https://code.visualstudio.com/docs/editor/multi-root-workspaces) in the VS Code documentation.
17
96
18
-
A multi-root workspace is defined by a `*.code-workspace`file. The file can have any name followed by *.code-workspace*, for example `test.code-workspace`. The `*.code-workspace` file stores information about what folders are in the workspace, and may also store other settings that would otherwise be stored in the settings.json or launch.json files. Settings in a folder's `.vscode/settings.json` or `.vscode/launch.json` will override those in the `*.code-workspace` file, so be careful to use one or the other unless you truly need to leverage this flexibility. You can have a workspace file even if you are only working with a single root folder. Indeed, if you are [working server-side](../serverside/) you will always be using a workspace file.
97
+
Since you have more than one root folder, settings are stored in a file with a `*.code-workspace`suffix. The file can have any name followed by *.code-workspace*, for example `test.code-workspace`. This file can be located anywhere. The `*.code-workspace` file stores information about what folders are in the workspace, and may also store other settings that would otherwise be stored in `settings.json` or `launch.json`. Settings in a folder's `.vscode/settings.json` or `.vscode/launch.json` will override those in the `*.code-workspace` file, so be careful to use one or the other unless you truly need to leverage this flexibility. You can have a workspace file even if you are only working with a single root folder. Indeed, if you are [working server-side](../serverside/) you will always be using a workspace file.
19
98
20
99
To edit **InterSystems ObjectScript** extension settings in a `*.code-workspace` file in VS Code, open the workspace using **File > Open Workspace...**, select **File > Preferences > Settings** (**Code > Preferences > Settings** on Mac) and select the Workspace tab. Search for **objectscript: conn**, and click on *Edit in settings.json*. VS Code opens the `*.code-workspace` file for that workspace.
0 commit comments