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: client/README.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,7 @@ Create or open any Puppet manifest with the extension `.pp` or `.epp` and the ex
37
37
- Import from `puppet resource` directly into manifests
38
38
- Node graph preview
39
39
- Puppet Development Kit integration
40
+
- (Experimental) Local debugging of Puppet manifests
40
41
41
42
## Feature information
42
43
@@ -99,6 +100,32 @@ To use any of the above commands, open the command palette and start typing a co
99
100
100
101
`PDK New Module` is available even if the extension isn't loaded, the rest of the commands are only available when the extension is loaded.
101
102
103
+
### Locally debugging Puppet manifests
104
+
105
+
**Note - This is an experimental feature**
106
+
107
+
The Puppet extension is able to debug the compilation of a Puppet manifest, much like a Go, PowerShell, C# etc. The debugger supports:
108
+
109
+
* Line breakpoints but not conditions on those breakpoints
110
+
* Function breakpoints
111
+
* Exception breakpoints
112
+
* Call stack
113
+
* Variables, but only at the top stack frame
114
+
* Limited interactive debug console. For example, you can assign a variable a value, but just as in regular Puppet you can't change its value later
115
+
* Step In, Out, Over
116
+
117
+
You may be presented with a Launch Configuration on first use. Please see the [VSCode Debugging link](https://code.visualstudio.com/docs/editor/debugging) for instructions on how to set this up.
118
+
119
+
Settings:
120
+
121
+
`manifest` - The manifest to apply. By default this is the currently open file in the editor
122
+
123
+
`noop` - Whether the `puppet apply` sets No Operation (Noop) mode. By default, this is set to false. This means when runing the debugger it can make changes to your system
124
+
125
+
`args` - Additional arguements to pass to `puppet apply`, for example `['--debug']` will output debug information
Copy file name to clipboardExpand all lines: client/package.json
+69-3Lines changed: 69 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,8 @@
27
27
"Linters",
28
28
"Languages",
29
29
"Snippets",
30
-
"Formatters"
30
+
"Formatters",
31
+
"Debuggers"
31
32
],
32
33
"keywords": [
33
34
"puppet",
@@ -309,7 +310,70 @@
309
310
"description": "The fully qualified path to the Puppet agent install directory. For example: 'C:\\Program Files\\Puppet Labs\\Puppet' or '/opt/puppetlabs/puppet'"
310
311
}
311
312
}
312
-
}
313
+
},
314
+
"breakpoints": [
315
+
{
316
+
"language": "puppet"
317
+
}
318
+
],
319
+
"debuggers": [
320
+
{
321
+
"type": "Puppet",
322
+
"label": "Puppet Debugger",
323
+
"program": "./out/src/debugAdapter.js",
324
+
"runtime": "node",
325
+
"languages": [
326
+
"puppet"
327
+
],
328
+
"configurationSnippets": [
329
+
{
330
+
"label": "Puppet: Apply Current File",
331
+
"description": "Apply current file (in active editor window) under debugger",
332
+
"body": {
333
+
"type": "Puppet",
334
+
"request": "launch",
335
+
"name": "Puppet Apply current file",
336
+
"manifest": "^\"\\${file}\"",
337
+
"args": [],
338
+
"noop": false,
339
+
"cwd": "^\"\\${file}\""
340
+
}
341
+
}
342
+
],
343
+
"configurationAttributes": {
344
+
"launch": {
345
+
"properties": {
346
+
"program": {
347
+
"type": "string",
348
+
"description": "Deprecated. Please use the 'manifest' property instead to specify the absolute path to the Puppet manifest to launch under the debugger."
349
+
},
350
+
"manifest": {
351
+
"type": "string",
352
+
"description": "Optional: Absolute path to the Puppet manifest to launch under the debugger."
353
+
},
354
+
"noop": {
355
+
"type": "boolean",
356
+
"description": "Optional: Whether the the Puppet run is in NoOp mode. Default is false.",
357
+
"default": false
358
+
},
359
+
"args": {
360
+
"type": "array",
361
+
"description": "Command line arguments to pass to Puppet.",
362
+
"items": {
363
+
"type": "string"
364
+
},
365
+
"default": []
366
+
},
367
+
"cwd": {
368
+
"type": "string",
369
+
"description": "Absolute path to the working directory. Default is the current workspace.",
0 commit comments