()
| 112 | * the format `pid:port`, where port is optional. |
| 113 | */ |
| 114 | export async function pickProcess(): Promise<string | null> { |
| 115 | try { |
| 116 | const item = await listProcesses(); |
| 117 | return item ? item.pidAndPort : null; |
| 118 | } catch (err) { |
| 119 | await vscode.window.showErrorMessage( |
| 120 | localize('process.picker.error', 'Process picker failed ({0})', err.message), |
| 121 | { modal: true }, |
| 122 | ); |
| 123 | return null; |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | //---- private |
| 128 |
no test coverage detected