Skip to content

Commit 9cf3b90

Browse files
author
Ravi Chande
authored
Merge branch 'master' into suppressWarnings
2 parents a23f05a + d53cc3b commit 9cf3b90

File tree

14 files changed

+348
-315
lines changed

14 files changed

+348
-315
lines changed

CHANGELOG.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,17 @@
77

88
#### Debugger
99

10-
* Adds support for [Source Link](https://aka.ms/SourceLinkSpec), Symbol Servers and other more advanced symbol options ([#373](https://github.com/OmniSharp/omnisharp-vscode/issues/373))
11-
* Adds launch.json option to suppress Just-In-Time compiler optimizations.
12-
* Due to the previous two items and work from the .NET Team, it is now possible to easily debug into ASP.NET itself in projects running against .NET Core 2.1 preview 1. Support for debugging into all the managed code in .NET Core will come in future .NET Core 2.1 builds. Instructions are in the [wiki](https://github.com/OmniSharp/omnisharp-vscode/wiki/Debugging-into-the-.NET-Framework-itself).
13-
* Adds a Code Lens indicator for runnning and debugging all tests in a class. ([#420](https://github.com/OmniSharp/omnisharp-vscode/issues/420), PR: [#1961](https://github.com/OmniSharp/omnisharp-vscode/pull/1961); PR: [omnisharp-roslyn#1089](https://github.com/OmniSharp/omnisharp-roslyn/pull/1089))
10+
* New features:
11+
* Adds support for [Source Link](https://aka.ms/SourceLinkSpec), Symbol Servers and other more advanced symbol options ([#373](https://github.com/OmniSharp/omnisharp-vscode/issues/373))
12+
* Adds launch.json option to suppress Just-In-Time compiler optimizations.
13+
* Due to the previous two items and work from the .NET Team, it is now possible to easily debug into ASP.NET itself in projects running against .NET Core 2.1. Instructions are in the [wiki](https://github.com/OmniSharp/omnisharp-vscode/wiki/Debugging-into-the-.NET-Framework-itself).
14+
* Adds support for pulling in environment variables from `${cwd}/Properties/launchSettings.json`. This means that if you add environment variable configuration to your launchSettings.json file, they will now be used when you start your app from Visual Studio Code like they previously would be used from the command line (`dotnet run`), and from Visual Studio. ([#2017](https://github.com/OmniSharp/omnisharp-vscode/issues/2017))
15+
* Adds a Code Lens indicator for running and debugging all tests in a class. ([#420](https://github.com/OmniSharp/omnisharp-vscode/issues/420), PR: [#1961](https://github.com/OmniSharp/omnisharp-vscode/pull/1961); PR: [omnisharp-roslyn#1089](https://github.com/OmniSharp/omnisharp-roslyn/pull/1089))
16+
17+
* Bug fixes:
18+
* On Linux, this reduces the native dependencies of the debugger to match the .NET Core 2.1 runtime. The Linux .NET Core 2.1 runtime reduced its native dependencies over all the previous versions, but the debugger still had the same dependencies as .NET Core 2.0. With this fix, the debugger will now continue to work on Linux after installing the .NET Core runtime and nothing else. ([#2199](https://github.com/OmniSharp/omnisharp-vscode/issues/2199))
19+
* Fixes async call stacks with the .NET Core 2.1 runtime. ([#1892](https://github.com/OmniSharp/omnisharp-vscode/issues/1892))
20+
* Fixes the debugger's browser launch code when launching projects configured to use Application Insights. ([2177](https://github.com/OmniSharp/omnisharp-vscode/issues/2177))
1421

1522
#### Specify OmniSharp Version
1623
Enables the use of pre-release builds of Omnisharp. Downloading a pre-release build of Omnisharp allows the C# extension for VS Code to use features that have been merged into the "master" branch of omnisharp-roslyn(https://github.com/OmniSharp/omnisharp-roslyn) but that have not been officially released

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
[![Wallaby.js](https://img.shields.io/badge/wallaby.js-configured-green.svg)](https://wallabyjs.com)
88

9-
Welcome to the C# extension for Visual Studio Code! This preview provides the following features inside VS Code:
9+
Welcome to the C# extension for Visual Studio Code! This extension provides the following features inside VS Code:
1010

1111
* Lightweight development tools for [.NET Core](https://dotnet.github.io).
1212
* Great C# editing support, including Syntax Highlighting, IntelliSense, Go to Definition, Find All References, etc.

RuntimeLicenses/license.txt

Lines changed: 128 additions & 103 deletions
Large diffs are not rendered by default.

debugger-launchjson.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,23 @@ Environment variables may be passed to your program using this schema:
5050
"myVariableName":"theValueGoesHere"
5151
}
5252

53+
NOTE: Environment variables can also be configured through a `${cwd}/Properties/launchSettings.json` file, which is useful for environment variables that should be set in all development scenarios -- when the project is started from the command line (`dotnet run`), from Visual Studio Code, or Visual Studio.
54+
55+
Example Properties/launchSettings.json file:
56+
57+
```json
58+
{
59+
"profiles": {
60+
"ProfileNameGoesHere": {
61+
"commandName": "Project",
62+
"environmentVariables": {
63+
"myVariableName":"theValueGoesHere"
64+
}
65+
}
66+
}
67+
}
68+
```
69+
5370
## Console (terminal) window
5471
By default, processes are launched with their console output (stdout/stderr) going to the VS Code Debugger Console. This is useful for executables that take their input from the network, files, etc. But this does NOT work for applications that want to read from the console (ex: `Console.ReadLine`). For these applications, use a setting such as the following:
5572

package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "csharp",
33
"publisher": "ms-vscode",
4-
"version": "1.15.0-beta4",
4+
"version": "1.15.0-beta5",
55
"description": "C# for Visual Studio Code (powered by OmniSharp).",
66
"displayName": "C#",
77
"author": "Microsoft Corporation",
88
"license": "SEE LICENSE IN RuntimeLicenses/license.txt",
99
"icon": "images/csharpIcon.png",
10-
"preview": true,
10+
"preview": false,
1111
"bugs": {
1212
"url": "https://github.com/OmniSharp/omnisharp-vscode/issues"
1313
},
@@ -221,8 +221,8 @@
221221
},
222222
{
223223
"description": ".NET Core Debugger (Windows / x64)",
224-
"url": "https://download.visualstudio.microsoft.com/download/pr/11709463/613b1473e1b85d7688b288818321b729/coreclr-debug-win7-x64.zip",
225-
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-15-0/coreclr-debug-win7-x64.zip",
224+
"url": "https://download.visualstudio.microsoft.com/download/pr/12149320/af1529a62f43fb8a922eccf750bdf9f7/coreclr-debug-win7-x64.zip",
225+
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-15-1/coreclr-debug-win7-x64.zip",
226226
"installPath": ".debugger",
227227
"platforms": [
228228
"win32"
@@ -234,8 +234,8 @@
234234
},
235235
{
236236
"description": ".NET Core Debugger (macOS / x64)",
237-
"url": "https://download.visualstudio.microsoft.com/download/pr/11709463/613b1473e1b85d7688b288818321b729/coreclr-debug-osx-x64.zip",
238-
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-15-0/coreclr-debug-osx-x64.zip",
237+
"url": "https://download.visualstudio.microsoft.com/download/pr/12149320/af1529a62f43fb8a922eccf750bdf9f7/coreclr-debug-osx-x64.zip",
238+
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-15-1/coreclr-debug-osx-x64.zip",
239239
"installPath": ".debugger",
240240
"platforms": [
241241
"darwin"
@@ -251,8 +251,8 @@
251251
},
252252
{
253253
"description": ".NET Core Debugger (linux / x64)",
254-
"url": "https://download.visualstudio.microsoft.com/download/pr/11709463/613b1473e1b85d7688b288818321b729/coreclr-debug-linux-x64.zip",
255-
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-15-0/coreclr-debug-linux-x64.zip",
254+
"url": "https://download.visualstudio.microsoft.com/download/pr/12149320/af1529a62f43fb8a922eccf750bdf9f7/coreclr-debug-linux-x64.zip",
255+
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-15-1/coreclr-debug-linux-x64.zip",
256256
"installPath": ".debugger",
257257
"platforms": [
258258
"linux"
@@ -386,12 +386,12 @@
386386
"items": {
387387
"type": "string"
388388
},
389-
"description": "Array of symbol server URLs (example: http://MyExampleSymbolServer) or directories (example: /build/symbols) to search for .pdb files. These directories will be searched in addition to the default locations -- next to the module and the path where the pdb was originally dropped to.",
389+
"description": "Array of symbol server URLs (example: http\u200b://MyExampleSymbolServer) or directories (example: /build/symbols) to search for .pdb files. These directories will be searched in addition to the default locations -- next to the module and the path where the pdb was originally dropped to.",
390390
"default": []
391391
},
392392
"searchMicrosoftSymbolServer": {
393393
"type": "boolean",
394-
"description": "If 'true' the Microsoft Symbol server (https://msdl.microsoft.com/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.",
394+
"description": "If 'true' the Microsoft Symbol server (https\u200b://msdl.microsoft.com\u200b/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.",
395395
"default": false
396396
},
397397
"cachePath": {
@@ -1105,12 +1105,12 @@
11051105
"items": {
11061106
"type": "string"
11071107
},
1108-
"description": "Array of symbol server URLs (example: http://MyExampleSymbolServer) or directories (example: /build/symbols) to search for .pdb files. These directories will be searched in addition to the default locations -- next to the module and the path where the pdb was originally dropped to.",
1108+
"description": "Array of symbol server URLs (example: http\u200b://MyExampleSymbolServer) or directories (example: /build/symbols) to search for .pdb files. These directories will be searched in addition to the default locations -- next to the module and the path where the pdb was originally dropped to.",
11091109
"default": []
11101110
},
11111111
"searchMicrosoftSymbolServer": {
11121112
"type": "boolean",
1113-
"description": "If 'true' the Microsoft Symbol server (https://msdl.microsoft.com/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.",
1113+
"description": "If 'true' the Microsoft Symbol server (https\u200b://msdl.microsoft.com\u200b/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.",
11141114
"default": false
11151115
},
11161116
"cachePath": {
@@ -1506,12 +1506,12 @@
15061506
"items": {
15071507
"type": "string"
15081508
},
1509-
"description": "Array of symbol server URLs (example: http://MyExampleSymbolServer) or directories (example: /build/symbols) to search for .pdb files. These directories will be searched in addition to the default locations -- next to the module and the path where the pdb was originally dropped to.",
1509+
"description": "Array of symbol server URLs (example: http\u200b://MyExampleSymbolServer) or directories (example: /build/symbols) to search for .pdb files. These directories will be searched in addition to the default locations -- next to the module and the path where the pdb was originally dropped to.",
15101510
"default": []
15111511
},
15121512
"searchMicrosoftSymbolServer": {
15131513
"type": "boolean",
1514-
"description": "If 'true' the Microsoft Symbol server (https://msdl.microsoft.com/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.",
1514+
"description": "If 'true' the Microsoft Symbol server (https\u200b://msdl.microsoft.com\u200b/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.",
15151515
"default": false
15161516
},
15171517
"cachePath": {
@@ -2167,12 +2167,12 @@
21672167
"items": {
21682168
"type": "string"
21692169
},
2170-
"description": "Array of symbol server URLs (example: http://MyExampleSymbolServer) or directories (example: /build/symbols) to search for .pdb files. These directories will be searched in addition to the default locations -- next to the module and the path where the pdb was originally dropped to.",
2170+
"description": "Array of symbol server URLs (example: http\u200b://MyExampleSymbolServer) or directories (example: /build/symbols) to search for .pdb files. These directories will be searched in addition to the default locations -- next to the module and the path where the pdb was originally dropped to.",
21712171
"default": []
21722172
},
21732173
"searchMicrosoftSymbolServer": {
21742174
"type": "boolean",
2175-
"description": "If 'true' the Microsoft Symbol server (https://msdl.microsoft.com/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.",
2175+
"description": "If 'true' the Microsoft Symbol server (https\u200b://msdl.microsoft.com\u200b/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.",
21762176
"default": false
21772177
},
21782178
"cachePath": {
@@ -2568,12 +2568,12 @@
25682568
"items": {
25692569
"type": "string"
25702570
},
2571-
"description": "Array of symbol server URLs (example: http://MyExampleSymbolServer) or directories (example: /build/symbols) to search for .pdb files. These directories will be searched in addition to the default locations -- next to the module and the path where the pdb was originally dropped to.",
2571+
"description": "Array of symbol server URLs (example: http\u200b://MyExampleSymbolServer) or directories (example: /build/symbols) to search for .pdb files. These directories will be searched in addition to the default locations -- next to the module and the path where the pdb was originally dropped to.",
25722572
"default": []
25732573
},
25742574
"searchMicrosoftSymbolServer": {
25752575
"type": "boolean",
2576-
"description": "If 'true' the Microsoft Symbol server (https://msdl.microsoft.com/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.",
2576+
"description": "If 'true' the Microsoft Symbol server (https\u200b://msdl.microsoft.com\u200b/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.",
25772577
"default": false
25782578
},
25792579
"cachePath": {
@@ -2657,4 +2657,4 @@
26572657
}
26582658
]
26592659
}
2660-
}
2660+
}

src/features/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default function registerCommands(server: OmniSharpServer, eventStream: E
4444
let d7 = vscode.commands.registerCommand('dotnet.generateAssets', async () => generateAssets(server));
4545

4646
// Register command for remote process picker for attach
47-
let d8 = vscode.commands.registerCommand('csharp.listRemoteProcess', async (args) => RemoteAttachPicker.ShowAttachEntries(args));
47+
let d8 = vscode.commands.registerCommand('csharp.listRemoteProcess', async (args) => RemoteAttachPicker.ShowAttachEntries(args, platformInfo));
4848

4949
// Register command for adapter executable command.
5050
let d9 = vscode.commands.registerCommand('csharp.coreclrAdapterExecutableCommand', async (args) => getAdapterExecutionCommand(platformInfo, eventStream));

src/features/processPicker.ts

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export class RemoteAttachPicker {
191191
return args.map(arg => this.quoteArg(arg)).join(" ");
192192
}
193193

194-
public static async ShowAttachEntries(args: any): Promise<string> {
194+
public static async ShowAttachEntries(args: any, platformInfo: PlatformInformation): Promise<string> {
195195
// Create remote attach output channel for errors.
196196
if (!RemoteAttachPicker._channel) {
197197
RemoteAttachPicker._channel = vscode.window.createOutputChannel('remote-attach');
@@ -216,7 +216,7 @@ export class RemoteAttachPicker {
216216
let pipeTransport = this.getPipeTransportOptions(args.pipeTransport, os.platform());
217217

218218
return RemoteAttachPicker.createPipeCmd(pipeTransport.pipeProgram, pipeTransport.pipeArgs, pipeTransport.quoteArgs)
219-
.then(async pipeCmd => RemoteAttachPicker.getRemoteOSAndProcesses(pipeCmd))
219+
.then(async pipeCmd => RemoteAttachPicker.getRemoteOSAndProcesses(pipeCmd, platformInfo))
220220
.then(processes => {
221221
let attachPickOptions: vscode.QuickPickOptions = {
222222
matchOnDescription: true,
@@ -229,10 +229,10 @@ export class RemoteAttachPicker {
229229
}
230230
}
231231

232-
public static async getRemoteOSAndProcesses(pipeCmd: string): Promise<AttachItem[]> {
232+
public static async getRemoteOSAndProcesses(pipeCmd: string, platformInfo: PlatformInformation): Promise<AttachItem[]> {
233233
const scriptPath = path.join(getExtensionPath(), 'scripts', 'remoteProcessPickerScript');
234234

235-
return execChildProcessAndOutputErrorToChannel(`${pipeCmd} < ${scriptPath}`, null, RemoteAttachPicker._channel).then(output => {
235+
return execChildProcessAndOutputErrorToChannel(`${pipeCmd} < ${scriptPath}`, null, RemoteAttachPicker._channel, platformInfo).then(output => {
236236
// OS will be on first line
237237
// Processess will follow if listed
238238
let lines = output.split(/\r?\n/);
@@ -504,23 +504,21 @@ async function execChildProcess(process: string, workingDirectory: string): Prom
504504
// VSCode cannot find the path "c:\windows\system32\bash.exe" as bash.exe is only available on 64bit OS.
505505
// It can be invoked from "c:\windows\sysnative\bash.exe", so adding "c:\windows\sysnative" to path if we identify
506506
// VSCode is running in windows and doesn't have it in the path.
507-
async function GetSysNativePathIfNeeded(): Promise<NodeJS.ProcessEnv> {
508-
return PlatformInformation.GetCurrent().then(platformInfo => {
509-
let env = process.env;
510-
if (platformInfo.isWindows() && platformInfo.architecture === "x86_64") {
511-
let sysnative: String = process.env.WINDIR + "\\sysnative";
512-
env.Path = process.env.PATH + ";" + sysnative;
513-
}
507+
async function GetSysNativePathIfNeeded(platformInfo: PlatformInformation): Promise<NodeJS.ProcessEnv> {
508+
let env = process.env;
509+
if (platformInfo.isWindows() && platformInfo.architecture === "x86_64") {
510+
let sysnative: String = process.env.WINDIR + "\\sysnative";
511+
env.Path = process.env.PATH + ";" + sysnative;
512+
}
514513

515-
return env;
516-
});
514+
return env;
517515
}
518516

519-
async function execChildProcessAndOutputErrorToChannel(process: string, workingDirectory: string, channel: vscode.OutputChannel): Promise<string> {
517+
async function execChildProcessAndOutputErrorToChannel(process: string, workingDirectory: string, channel: vscode.OutputChannel, platformInfo: PlatformInformation): Promise<string> {
520518
channel.appendLine(`Executing: ${process}`);
521519

522520
return new Promise<string>(async (resolve, reject) => {
523-
return GetSysNativePathIfNeeded().then(newEnv => {
521+
return GetSysNativePathIfNeeded(platformInfo).then(newEnv => {
524522
child_process.exec(process, { cwd: workingDirectory, env: newEnv, maxBuffer: 500 * 1024 }, (error: Error, stdout: string, stderr: string) => {
525523
let channelOutput = "";
526524

src/observers/OmnisharpLoggerObserver.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ export class OmnisharpLoggerObserver extends BaseLoggerObserver {
5454
}
5555

5656
private handleOmnisharpLaunch(event: OmnisharpLaunch) {
57-
if (event.usingMono) {
58-
this.logger.appendLine(`OmniSharp server started with Mono`);
57+
if (event.monoVersion) {
58+
this.logger.appendLine(`OmniSharp server started with Mono ${event.monoVersion}`);
5959
}
6060
else {
6161
this.logger.appendLine(`OmniSharp server started`);

0 commit comments

Comments
 (0)