|
| 1 | +{ |
| 2 | + // Place your PowerShellEditorServices workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and |
| 3 | + // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope |
| 4 | + // is left empty or omitted, the snippet gets applied to all languages. The prefix is what is |
| 5 | + // used to trigger the snippet and the body will be expanded and inserted. Possible variables are: |
| 6 | + // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. |
| 7 | + // Placeholders with the same ids are connected. |
| 8 | + // Example: |
| 9 | + // "Print to console": { |
| 10 | + // "scope": "javascript,typescript", |
| 11 | + // "prefix": "log", |
| 12 | + // "body": [ |
| 13 | + // "console.log('$1');", |
| 14 | + // "$2" |
| 15 | + // ], |
| 16 | + // "description": "Log output to console" |
| 17 | + // } |
| 18 | + // Use https://snippet-generator.app/ to generate snippets |
| 19 | + "Wait for debugger to be attached": { |
| 20 | + "prefix": "WaitForDebugger", |
| 21 | + "body": [ |
| 22 | + "while (!System.Diagnostics.Debugger.IsAttached)", |
| 23 | + "{", |
| 24 | + " System.Console.WriteLine(System.Diagnostics.Process.GetCurrentProcess().Id);", |
| 25 | + " System.Threading.Thread.Sleep(2000);", |
| 26 | + "}" |
| 27 | + ], |
| 28 | + "description": "Wait for debugger to be attached" |
| 29 | + }, |
| 30 | + "Copyright header": { |
| 31 | + "prefix": "CopyrightHeader", |
| 32 | + "body": [ |
| 33 | + "//", |
| 34 | + "// Copyright (c) Microsoft. All rights reserved.", |
| 35 | + "// Licensed under the MIT license. See LICENSE file in the project root for full license information.", |
| 36 | + "//" |
| 37 | + ], |
| 38 | + "description": "Copyright header" |
| 39 | + } |
| 40 | +} |
0 commit comments