Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add command 'listRemoteDockerProcess' and variable 'pickRemoteDockerProcess' #4617

Merged
merged 2 commits into from
Jun 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@
"onCommand:csharp.downloadDebugger",
"onCommand:csharp.listProcess",
"onCommand:csharp.listRemoteProcess",
"onCommand:csharp.listRemoteDockerProcess",
"onCommand:omnisharp.registerLanguageMiddleware",
"workspaceContains:project.json",
"workspaceContains:*.csproj",
Expand Down Expand Up @@ -974,6 +975,11 @@
"title": "List processes on remote connection for attach",
"category": "CSharp"
},
{
"command": "csharp.listRemoteDockerProcess",
"title": "List processes on Docker connection",
"category": "CSharp"
},
{
"command": "csharp.reportIssue",
"title": "Report an issue",
Expand Down Expand Up @@ -1043,7 +1049,8 @@
"label": ".NET Core",
"variables": {
"pickProcess": "csharp.listProcess",
"pickRemoteProcess": "csharp.listRemoteProcess"
"pickRemoteProcess": "csharp.listRemoteProcess",
"pickRemoteDockerProcess": "csharp.listRemoteDockerProcess"
},
"aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
"configurationAttributes": {
Expand Down Expand Up @@ -2142,7 +2149,8 @@
"label": ".NET",
"variables": {
"pickProcess": "csharp.listProcess",
"pickRemoteProcess": "csharp.listRemoteProcess"
"pickRemoteProcess": "csharp.listRemoteProcess",
"pickRemoteDockerProcess": "csharp.listRemoteDockerProcess"
},
"aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
"configurationAttributes": {
Expand Down
7 changes: 7 additions & 0 deletions src/features/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import * as fs from 'fs';
import * as path from 'path';
import * as protocol from '../omnisharp/protocol';
import * as vscode from 'vscode';
import { RemoteAttachPicker } from './processPicker';
import { generateAssets } from '../assets';
import { ShowOmniSharpChannel, CommandDotNetRestoreStart, CommandDotNetRestoreProgress, CommandDotNetRestoreSucceeded, CommandDotNetRestoreFailed } from '../omnisharp/loggingEvents';
import { EventStream } from '../EventStream';
Expand Down Expand Up @@ -42,6 +43,12 @@ export default function registerCommands(context: vscode.ExtensionContext, serve
disposable.add(vscode.commands.registerCommand('csharp.listProcess', () => ""));
disposable.add(vscode.commands.registerCommand('csharp.listRemoteProcess', () => ""));

// List remote processes for docker extension.
// Change to return "" when https://github.com/microsoft/vscode/issues/110889 is resolved.
disposable.add(vscode.commands.registerCommand('csharp.listRemoteDockerProcess', async (args) => {
const attachItem = await RemoteAttachPicker.ShowAttachEntries(args, platformInfo);
return attachItem ? attachItem.id : Promise.reject<string>(new Error("Could not find a process id to attach."));
}));

// Register command for generating tasks.json and launch.json assets.
disposable.add(vscode.commands.registerCommand('dotnet.generateAssets', async (selectedIndex) => generateAssets(server, selectedIndex)));
Expand Down