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
+31-4Lines changed: 31 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,10 +110,6 @@ Open the folder where you want client-side files to be located. Select the **Obj
110
110
111
111
You cannot create a connection to a server that is not running.
112
112
113
-
Click on the server and namespace in the status bar to open a list of actions you can take for this server:
114
-
115
-

116
-
117
113
## Editing a Server Connection
118
114
119
115
If you need to modify a server connection select **File > Preferences > Settings** (**Code > Preferences > Settings** on Mac) from the menu. Select the **Workspace** settings level. Search for **objectscript: conn**, and click on *Edit in settings.json*.
@@ -133,3 +129,34 @@ The components of this configuration are:
133
129
-**ns** - namespace to use on the server
134
130
-**server** - server name as specified in the server configuration
135
131
-**active** - specifies whether the connection is active.
132
+
133
+
## Add Custom Entries to the Server Actions Menu
134
+
135
+
Click on the server and namespace in the status bar to open a list of actions you can take for this server:
136
+
137
+

138
+
139
+
You can add custom entries to this list using the `objectscript.conn.links` configuration object, which contains key-value pairs where the key is the label displayed in the menu and the value is the uri to open. The following variables are available for substitution in the uri:
140
+
141
+
-**${host}** - The hostname of the connected server. For example, `localhost`
142
+
-**${port}** - The port of the connected server. For example, `52773`
143
+
-**${serverUrl}** - The full connection string for the server. For example, `http://localhost:52773/pathPrefix`
144
+
-**${ns}** - The namespace that we are connected to, URL encoded. For example, `%25SYS` or `USER`
145
+
-**${namespace}** - The raw `ns` parameter of the connection. For example, `sys` or `user`
146
+
-**${classname}** - The name of the currently opened class, or the empty string if the currently opened document is not a class.
Copy file name to clipboardExpand all lines: docs/RunDebug.md
+42-13Lines changed: 42 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,20 +8,20 @@ nav_order: 5
8
8
9
9
The InterSystems ObjectScript Extension provides support for ObjectScript debugging. It takes advantage of the debugging capabilities built into VS Code, so you may find these VS Code documentation resources useful:
10
10
11
-
-[Node.js debugging in VS Code](https://code.visualstudio.com/docs/editor/debugging)
-[Debugging User Guide](https://code.visualstudio.com/docs/editor/debugging)
13
13
14
-
## Launch Configurations
14
+
## Debug Configurations
15
15
16
-
In order to run or debug an ObjectScript class or routine, you must create a launch configuration. Some other languages default to running the currently active file, but to run ObjectScript, you must specify the routine or ClassMethod to use.
16
+
In order to run or debug an ObjectScript class or routine or attach to a running process, you must create a debug configuration. Some other languages default to running the currently active file, but to run ObjectScript, you must specify the routine or ClassMethod to use or the running process to attach to.
Clicking the link opens a dialog containing a list of debug environments. Select **ObjectScript Debug**.
27
27
@@ -42,13 +42,13 @@ Once you have chosen a debug environment, VS Code creates and opens a `launch.js
42
42
}
43
43
```
44
44
45
-
These attributes are mandatory for any launch configuration:
45
+
These attributes are mandatory for any debug configuration:
46
46
47
47
-**type** - Identifies the type of debugger to use. In this case, `objectscript`, supplied by the InterSystems ObjectScript extension.
48
48
-**request** - Identifies the type of action for this launch configuration. Possible values are `launch` and `attach`.
49
49
-**name** - An arbitrary name to identify the configuration. This name appears in the Start Debugging drop down list.
50
50
51
-
In addition, for an **objectscript** configuration, you need to supply the attribute **program**, which specifies the routine or ClassMethod to run when launching the debugger, as shown in the following example:
51
+
In addition, for an **objectscript launch** configuration, you need to supply the attribute **program**, which specifies the routine or ClassMethod to run when launching the debugger, as shown in the following example:
52
52
53
53
```json
54
54
"launch": {
@@ -68,15 +68,44 @@ In addition, for an **objectscript** configuration, you need to supply the attri
For an **objectscript attach** configuration, you may supply the following attributes:
75
+
76
+
-**processId** - Specifies the ID of process to attach to as a `string` or `number`. Defaults to `"${command:PickProcess}"`, which provides a dropdown list of process ID's to attach to at runtime.
77
+
-**system** - Specifies whether to allow attaching to system process. Defaults to `false`.
78
+
79
+
The following example shows multiple valid **objectscript attach** configurations:
80
+
81
+
```json
82
+
"launch": {
83
+
"version": "0.2.0",
84
+
"configurations": [
85
+
{
86
+
"type": "objectscript",
87
+
"request": "attach",
88
+
"name": "Attach 1",
89
+
"processId": 5678
90
+
},
91
+
{
92
+
"type": "objectscript",
93
+
"request": "attach",
94
+
"name": "Attach 2",
95
+
"system": true
96
+
},
97
+
]
98
+
}
99
+
```
100
+
101
+
## Starting a Debugging Session
102
+
103
+
You can select a debug configuration from the list VS Code provides in the Run and Debug field at the top of the debug side bar:
75
104
76
-
You can select a launch configuration from the list VS Code provides in the Run and Debug field at the top of the debug side bar:
Clicking on the green arrow runs the currently selected debug configuration.
79
108
80
-
Clicking on the green arrow runs the currently selected launch configuration.
109
+
When starting **objectscript launch** debug session, make sure that the file containing the **program** that you are debugging is open in your editor and is the active tab. VS Code will start a debug session with the server of the file in the active editor (the tab that the user is focused on).
81
110
82
111
Debugging commands and items on the **Run** menu function much as they do for other languages supported by VS Code. For information on VS Code debugging, see the documentation resources listed at the start of this section.
0 commit comments