Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
95832f7
Merge pull request #1321 from OmniSharp/release
DustinCampbell Mar 14, 2017
c3862f4
Adding QuoteArgs Flag (#1322)
WardenGnaw Mar 14, 2017
60799e8
fix readme typo (#1326)
ZLima12 Mar 15, 2017
29db22b
Clarify and shorten watch NPM task description
peterblazejewicz Mar 17, 2017
6540859
Switch from deprecated outDir to outFiles
peterblazejewicz Mar 18, 2017
d8ba498
Merge pull request #1334 from peterblazejewicz/feature/outdir
DustinCampbell Mar 20, 2017
9a25c78
Merge pull request #1332 from peterblazejewicz/update/readme
DustinCampbell Mar 21, 2017
7e92176
Add '"' and ':' as trigger characters for project.json completion
DustinCampbell Mar 21, 2017
5566d5f
Add additional trigger characters and filter text for project.json co…
DustinCampbell Mar 21, 2017
4e9e98a
Merge pull request #1338 from DustinCampbell/project-json-triggers
DustinCampbell Mar 21, 2017
edece0d
1.8.0 -> 1.9.0-beta1
DustinCampbell Mar 21, 2017
5261138
Update changelog
DustinCampbell Mar 21, 2017
e1b0ab2
Fix changelog typo
DustinCampbell Mar 21, 2017
bf76b81
Merge pull request #1339 from DustinCampbell/update-1.9.0-beta1
DustinCampbell Mar 21, 2017
054cdb1
Updating debugger to 1.9.0 which has the macos Sierra fix. (#1349)
rajkumar42 Mar 28, 2017
a105752
Update package.json/CHANGELOG.md for 1.9.0-beta2 (#1350)
gregg-miskelly Mar 28, 2017
9292f7c
Always use posix paths in asset generation
chuckries Mar 29, 2017
d3ba536
Update changelog
chuckries Mar 29, 2017
beb776a
Merge pull request #1354 from chuckries/assetsPosixPaths
chuckries Mar 29, 2017
2c16a3e
Merge release into master
gregg-miskelly Mar 31, 2017
0e09076
Merge pull request #1359 from gregg-miskelly/merge-release-to-master
DustinCampbell Mar 31, 2017
f760886
Fix debugger.md markdown (#1360)
gregg-miskelly Mar 31, 2017
c4f68af
Adding help text to created launch.json (#1358)
WardenGnaw Apr 3, 2017
bf01486
Stops considering update operations when generating assets
eamodio Apr 4, 2017
f9b8863
Looks up build task by metadata rather than name
eamodio Apr 4, 2017
d249ca5
Merge pull request #1363 from eamodio/master
DustinCampbell Apr 5, 2017
e84ada8
Update OmniSharp prototcol for test and print test messages to output
DustinCampbell Apr 5, 2017
c89ce0d
Move convertNativePathToPosix to common
DustinCampbell Apr 5, 2017
d58a4c8
Add support for OmniSharp protocol changes to run/debug tests with 'd…
DustinCampbell Apr 6, 2017
da55ae4
Tweak for OmniSharp protocol
DustinCampbell Apr 6, 2017
3b8faea
Update OmniSharp to 1.14.0
DustinCampbell Apr 6, 2017
82e2eb9
1.9.0-beta2 -> 1.9.0-beta3
DustinCampbell Apr 6, 2017
3a3d0a2
Add TODO comment
DustinCampbell Apr 6, 2017
7530622
Add 'omnisharp.waitForDebugger' option to pass the --debug flag with …
DustinCampbell Apr 7, 2017
871a89f
Merge pull request #1370 from DustinCampbell/omnisharp-debug-option
DustinCampbell Apr 7, 2017
6be1bc0
Adding in configuration snippets (#1366)
WardenGnaw Apr 7, 2017
610c50d
Improve dependancy handling / Linux distro handling (#1371)
gregg-miskelly Apr 7, 2017
0cca9cf
Update to new OmniSharp and change to launch test under debugger
DustinCampbell Apr 10, 2017
cc79712
Merge pull request #1367 from DustinCampbell/improved-test-support
DustinCampbell Apr 11, 2017
90c6d3b
Fix RemoteProcessPicker (#1373)
WardenGnaw Apr 11, 2017
d4403d7
Properly handle quoted arguments when splitting command line argument…
DustinCampbell Apr 11, 2017
e495a08
Merge pull request #1376 from DustinCampbell/fix-arg-splitting-for-vs…
DustinCampbell Apr 11, 2017
731d509
Don't create hidden diagnostics
DustinCampbell Apr 11, 2017
143aca7
Merge pull request #1378 from DustinCampbell/diagnostic-spam
DustinCampbell Apr 11, 2017
68905f6
Update the debugger to 1.9.2 (#1389)
gregg-miskelly Apr 13, 2017
944cd1a
Adding clr debugger (#1390)
WardenGnaw Apr 13, 2017
059a845
Work In progress: support for sending events from the debugger
gregg-miskelly Apr 12, 2017
c0acfe7
Fix Linux, 'EventType' declaration, and add '_isClosed'
gregg-miskelly Apr 12, 2017
974fc89
Complete work for PR 1379
gregg-miskelly Apr 13, 2017
a26c09b
Merge pull request #1379 from gregg-miskelly/debuggerEventsPipeName
DustinCampbell Apr 17, 2017
61d761d
Consume debugger events and notify OmniSharp
DustinCampbell Apr 17, 2017
f92b9df
Merge pull request #1397 from DustinCampbell/use-debugger-events
DustinCampbell Apr 17, 2017
2d6b347
Add recent updates to changelog for 1.9
DustinCampbell Apr 19, 2017
6f53904
Fixing processPicker for WSL (#1405)
WardenGnaw Apr 19, 2017
bd4cc4a
Merge pull request #1407 from DustinCampbell/update-changelog
DustinCampbell Apr 19, 2017
e9ab813
Debugger doc updates for 1.9 (#1408)
gregg-miskelly Apr 20, 2017
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
8 changes: 6 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
],
"stopOnEntry": false,
"sourceMaps": true,
"outDir": "${workspaceRoot}/out/src"
"outFiles": [
"${workspaceRoot}/out/src/**/*.js"
]
},
{
"name": "Launch Tests",
Expand All @@ -21,7 +23,9 @@
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/test" ],
"stopOnEntry": false,
"sourceMaps": true,
"outDir": "${workspaceRoot}/out/test"
"outFiles": [
"${workspaceRoot}/out/test/**/*.js"
]
}
]
}
42 changes: 41 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,49 @@
## Known Issues
## Known Issues in 1.8.1

* Running and debugging of tests are not supported in .csproj-based .NET Core projects. However, there will still be clickable "run test" and "debug test" indicators above test methods. ([#1100](https://github.com/OmniSharp/omnisharp-vscode/issues/1100))
* When opening a .csproj-based .NET Core project in VS Code, the C# extension will not activate until a C# file is opened in the editor. ([#1150](https://github.com/OmniSharp/omnisharp-vscode/issues/1150))
* There currently is no completion support for package references in csproj files. ([#1156](https://github.com/OmniSharp/omnisharp-vscode/issues/1156))

## 1.9.0 _(Not Yet Released)_

#### Unit Testing

* Support added for running and debugging unit tests in .csproj-based .NET Core projects. ([#1100](https://github.com/OmniSharp/omnisharp-vscode/issues/1100))

#### Debugger

* **Arch Linux change**: Before, the debugger would automatically use the Ubuntu 16 debugger on Arch. Now we require the debugger to be explicitly set. See https://aka.ms/vscode-csext-arch for more information.
* Several bug fixes that addressed problems with launch ([#1335](https://github.com/OmniSharp/omnisharp-vscode/issues/1335), [#1336](https://github.com/OmniSharp/omnisharp-vscode/issues/1336))
* Fixed several pipeTransport issues including introducing a new `quoteArgs` option ([#1318](https://github.com/OmniSharp/omnisharp-vscode/issues/1318)), and fixing attach with Docker ([#1369](https://github.com/OmniSharp/omnisharp-vscode/issues/1369))
* Fix issue where VS Code would incorrectly display threads as paused ([#1317](https://github.com/OmniSharp/omnisharp-vscode/issues/1317))
* Added new 'csharp.fallbackDebuggerLinuxRuntimeId' configuration setting to control the version of the debugger used on Linux ([#1361](https://github.com/OmniSharp/omnisharp-vscode/issues/1361)).
* Added a new `clr` debugging `type` in launch.json to enable debugging for Azure scenarios. That type is limited to Windows Desktop CLR, 64-bit processes, and only supports the [Portable PDB debug format](https://github.com/OmniSharp/omnisharp-vscode/wiki/Portable-PDBs).
* Added support for the launch.json editor's 'Add Configuration' button ([#1024](https://github.com/OmniSharp/omnisharp-vscode/issues/1024]))

#### Project System

* Properly handle package references with version ranges in .csproj (PR: [omnisharp-roslyn#814](https://github.com/OmniSharp/omnisharp-roslyn/pull/814))
* Fix regression with MSBuild project system where a project reference and a binary reference could be added for the same assembly, causing ambiguity errors ([omnisharp-roslyn#795](https://github.com/OmniSharp/omnisharp-roslyn/issues/795), PR: [omnisharp-roslyn#815](https://github.com/OmniSharp/omnisharp-roslyn/pull/815))
* If VS 2017 is on the current machine, use the MSBuild included with VS 2017 for processing projects. ([#1368](https://github.com/OmniSharp/omnisharp-vscode/issues/1368), PR: [omnisharp-roslyn#818]()https://github.com/OmniSharp/omnisharp-roslyn/issues/818)
* Fixed null reference exception in DotNetProjectSystem when project reference is invalid (PR: [omnisharp-roslyn#797](https://github.com/OmniSharp/omnisharp-roslyn/pull/797))

#### Improved OmniSharp Settings
* Added support for global omnisharp.json file ([omnisharp-roslyn#717](https://github.com/OmniSharp/omnisharp-roslyn/issues/7170), PR: [omnisharp-roslyn#809](https://github.com/OmniSharp/omnisharp-roslyn/pull/809)) _(Contributed by [@filipw](https://github.com/filipw))_

This file can appear in one of the following locations:
* Windows: `%APPDATA%\OmniSharp\omnisharp.json`
* macOS/Linus: `~/.omnisharp/omnisharp.json`
* Watch local and global omnisharp.json files for changes while OmniSharp is running. Currently, this only works for formatting options. (PR: [omnisharp-roslyn#804](https://github.com/OmniSharp/omnisharp-roslyn/pull/804))_(Contributed by [@filipw](https://github.com/filipw))_
* New 'omnisharp.waitForDebugger' setting to make it easier to debug the OmniSharp server itself. (PR: [#1370](https://github.com/OmniSharp/omnisharp-roslyn/pull/1370))

#### Other Updates and Fixes

* Improvements made to project.json package completion experience. ([#1338](https://github.com/OmniSharp/omnisharp-vscode/pull/1338))
* Diagnostics are no longer created for hidden diagnostics, addressing the problem of "Remove Unnecessary Usings" spam in the Problems pane. ([#1231](https://github.com/OmniSharp/omnisharp-vscode/issues/1231))
* Improved the extension's runtime dependency download logic to skip re-downloading packages that were already successfully downloaded and installed.
* Assets for building and debugging are now always generated with POSIX style paths. ([#1354](https://github.com/OmniSharp/omnisharp-vscode/pull/1354))
* Don't offer to generate tasks.json if build task already exists. (PR #1363) _(Contributed by [@eamodio](https://github.com/eamodio))_

## 1.8.1 (March 31, 2017)

Fixes debugging on macOS Sierra 10.12.4.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ See our [change log](https://github.com/OmniSharp/omnisharp-vscode/blob/v1.8.0/C

### Supported Operating Systems for Debugging

* Currently, the C# debugger supports the following operatings systems:
* Currently, the C# debugger supports the following operating systems:

* Windows (64-bit only)
* macOS
Expand Down Expand Up @@ -64,7 +64,7 @@ To **run and develop** do the following:
* Run `npm i`
* Run `npm run compile`
* Open in Visual Studio Code (`code .`)
* *Optional:* run `tsc -w`, make code changes (on Windows, try `start node ".\node_modules\typescript\bin\tsc -w"`)
* *Optional:* run `npm run watch`, make code changes
* Press <kbd>F5</kbd> to debug

To **test** do the following: `npm run test` or <kbd>F5</kbd> in VS Code with the "Launch Tests" debug configuration.
Expand Down
112 changes: 112 additions & 0 deletions debugger-launchjson.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Configurating launch.json for C# debugging
The launch.json file is used to configure the debugger in Visual Studio Code.

Visual Studio Code generates a launch.json with almost all of the required information.
If your workspace has only one launchable project, the C# extension will offer to automatically generate this file.
If you missed this prompt, you can force the generation by executing the command `.NET: Generate Assets for Build and Debug` from the VS Code command palette.
The generated file contains two sections. One that configures debugging for launch and a second that configures debugging for attach.

If you have more than one launchable project, then you will need to modify your launch.json file by hand.
Visual Studio Code will still generate a basic template, but you will need to fill in the 'program' field to point at the executable dll that you would like to debug.


# Configurating VS Code's debugging behavior

## PreLaunchTask
The `preLaunchTask` field runs the associated taskName in tasks.json before debugging your program. You can get the default build prelaunch task by executing the command `Tasks: Configure Tasks Runner` from the VS Code command palette.

This will create a task that runs `dotnet build`. You can read more about tasks at [https://code.visualstudio.com/docs/editor/tasks](https://code.visualstudio.com/docs/editor/tasks).

## Program
The program field is set to the path to the application dll or .NET Core host executable to launch.

Example: "${workspaceRoot}/bin/Debug/\<target-framework\>/\<project-name.dll\>" where:

* \<target-framework\>: (example: 'netstandard1.5') This is the framework that the app is being built for. It is set in the project.json file.
* \<project-name\>: (example: 'MyApp') The name of the project being debugged.",

## Cwd
The working directory of the target process.

## Args
These are the arguments that will be passed to your program.

## Stop at Entry
If you need to stop at the entry point of the target, you can optionally set `stopAtEntry` to be "true".

## Launch Browser
The launch browser field can be optionally added if you need to launch with a web browser.
If there are web server dependencies in your project.json, the auto generated launch file will add launch
browser for you. It will open with the default program to handle URLs.

## Environment variables
Environment variables may be passed to your program using this schema:

"env": {
"myVariableName":"theValueGoesHere"
}

## Console (terminal) window
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:

"console": "integratedTerminal"

When this is set to `integratedTerminal` the target process will run inside [VS Code's integrated terminal](https://code.visualstudio.com/docs/editor/integrated-terminal). Click the 'Terminal' tab in the tab group beneath the editor to interact with your application.

When this is set to `externalTerminal` the target process will run in a separate terminal.

## Source File Map
You can optionally configure a file by file mapping by providing map following this schema:

"sourceFileMap": {
"C:\foo":"/home/me/foo"
}

## Symbol Path
You can optionally provide paths to symbols following this schema:

"symbolPath": [ "/Volumes/symbols" ]

## Just My Code
You can optionally disable `justMyCode` by setting it to "false". You should disable Just My Code when you are trying to debug into a library that you pulled down which doesn't have symbols or is optimized.

"justMyCode":false*

Just My Code is a set of features that makes it easier to focus on debugging your code by hiding some of the details of optimized libraries that you might be using, like the .NET Framework itself. The most important sub parts of this feature are --

* User-unhandled exceptions: automatically stop the debugger just before exceptions are about to be caught by the framework
* Just My Code stepping: when stepping, if framework code calls back to user code, automatically stop.

## Require Exact Source
The debugger requires the pdb and source code to be exactly the same. To change this and disable the sources to be the same add:

"requireExactSource": false

## Stepping into properties and operators
The debugger steps over properties and operators in managed code by default. In most cases, this provides a better debugging experience. To change this and enable stepping into properties or operators add:

"enableStepFiltering": false

## Logging
You can optionally enable or disable messages that should be logged to the output window. The flags in the logging field are: 'exceptions', 'moduleLoad', 'programOutput', 'engineLogging', and 'browserStdOut'.

## PipeTransport
If you need to have the debugger to connect to a remote computer using another executable to relay standard input and output bewteen VS Code and the .NET Core debugger backend (vsdbg),
then add the pipeTransport field folloing this schema:

"pipeTransport": {
"pipeProgram": "ssh",
"pipeArgs": [ "-T", "ExampleAccount@ExampleTargetComputer" ],
"debuggerPath": "~/vsdbg/vsdbg",
"pipeCwd": "${workspaceRoot}",
"quoteArgs": true
}

More information about pipe transport can be found [here](https://github.com/OmniSharp/omnisharp-vscode/wiki/Attaching-to-remote-processes).

You can find information on configuring pipe transport for [Windows Subsystem for Linux](https://msdn.microsoft.com/en-us/commandline/wsl/about) (WSL) [here](https://github.com/OmniSharp/omnisharp-vscode/wiki/Windows-Subsystem-for-Linux).

## Operating System Specific Configurations
If there specific commands that need to be changed per operating system, you can use the fields: 'windows', 'osx', or 'linux'.
You can replace any of the fields mentioned above for the specific operating system.

61 changes: 9 additions & 52 deletions debugger.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#Instructions for setting up the .NET Core debugger
# Instructions for setting up the .NET Core debugger
This page gives you detailed instructions on how to debug code running under .NET Core in VS Code.

####Your Feedback​
#### Your Feedback​
File bugs and feature requests [here](https://github.com/OmniSharp/omnisharp-vscode/issues) and [join our insiders group](http://landinghub.visualstudio.com/dotnetcoreinsiders) to help us build great tooling for .NET Core.

####Requirements
#### Requirements
* Requires .NET Core 1.0 (rc2 are earlier releases are not supported)
* X64 only
* Supported operating systems:
* macOS: 10.11+ (El Capitan+)
* Linux: Red Hat Enterprise Linux 7.2+, Ubuntu 14.04 LTS, Ubuntu 16.04 LTS, Debian 8.2+, Linux Mint 17+, CentOS 7.1+, Oracle Linux 7.1+, Fedora 23, openSUSE 13.2
* Windows: 7+

###First Time setup
### First Time setup
##### 1: Get Visual Studio Code
Install Visual Studio Code (VSC). Pick the latest VSC version from here: https://code.visualstudio.com Make sure it is at least 1.5.

Expand All @@ -35,9 +35,8 @@ If you have previously installed the C# extension, make sure that you have a rec
The first time that C# code is opened in VS Code, the extension will download the platform-specific files needed for debugging and editing. Debugging and editor features will not work until these steps finish.


###Once for each project
### Once for each project
The following steps have to executed for every project.

##### 1: Get a project
You can start from scratch by creating an empty project with `dotnet new`. Begin by opening the terminal in Visual Studio Code (`View->Integrated Terminal`) and type these commands:

Expand Down Expand Up @@ -80,56 +79,14 @@ If your code has multiple projects or you would rather generate these files by h
##### 4: Start debugging
Your project is now all set. Set a breakpoint or two where you want to stop, click the debugger play button (or press <kbd>F5</kbd>) and you are off.

###Debugging Code compiled on another computer
### Debugging Code compiled on another computer
If your code was built on a different computer from where you would like to run in there are a few things to keep in mind --

* **Source Maps**: Unless your local source code is at exactly the same path as where the code was originally built you will need to add a [sourceFileMap](#source-file-map) to launch.json.
* **Source Maps**: Unless your local source code is at exactly the same path as where the code was originally built you will need to add a [sourceFileMap](https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#source-file-map) to launch.json.
* **Portable PDBs**: If the code was built on Windows, it might have been built using Windows PDBs instead of portable PDBs, but the C# extension only supports portable PDBs. See the [portable PDB documentation](https://github.com/OmniSharp/omnisharp-vscode/wiki/Portable-PDBs#how-to-generate-portable-pdbs) for more information.
* **Debug vs. Release**: It is much easier to debug code which has been compiled in the `Debug` configuration. So unless the issue you are looking at only reproduces with optimizations, it is much better to use Debug bits. If you do need to debug optimized code, you will need to disable [justMyCode](#just-my-code) in launch.json.

####More things to configure In launch.json
#####Just My Code
You can optionally disable justMyCode by setting it to "false". You should disable Just My Code when you are trying to debug into a library that you pulled down which doesn't have symbols or is optimized.

"justMyCode":false*

Just My Code is a set of features that makes it easier to focus on debugging your code by hiding some of the details of optimized libraries that you might be using, like the .NET Framework itself. The most important sub parts of this feature are --

* User-unhandled exceptions: automatically stop the debugger just before exceptions are about to be caught by the framework
* Just My Code stepping: when stepping, if framework code calls back to user code, automatically stop.

#####Source File Map
You can optionally configure a file by file mapping by providing map following this schema:

"sourceFileMap": {
"C:\foo":"/home/me/foo"
}

#####Symbol Path
You can optionally provide paths to symbols following this schema:

"symbolPath": [ "/Volumes/symbols" ]

#####Environment variables
Environment variables may be passed to your program using this schema:

"env": {
"myVariableName":"theValueGoesHere"
}

#####Console (terminal) window
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:

"console": "integratedTerminal"

When this is set to `integratedTerminal` the target process will run inside [VS Code's integrated terminal](https://code.visualstudio.com/docs/editor/integrated-terminal). Click the 'Terminal' tab in the tab group beneath the editor to interact with your application.

When this is set to `externalTerminal` the target process will run in a separate terminal.

##### Stepping into properties and operators
The debugger steps over properties and operators in managed code by default. In most cases, this provides a better debugging experience. To change this and enable stepping into properties or operators add:
* **Debug vs. Release**: It is much easier to debug code which has been compiled in the `Debug` configuration. So unless the issue you are looking at only reproduces with optimizations, it is much better to use Debug bits. If you do need to debug optimized code, you will need to disable [justMyCode](https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#just-my-code) in launch.json.

"enableStepFiltering": false
#### [Configurating launch.json for C# Debugging](debugger-launchjson.md)

#### Attach Support
The C# debugger supports attaching to processes. To do this, switch to the Debug tab, and open the configuration drop down.
Expand Down
Loading