Skip to content

Commit

Permalink
Merge pull request #44 from OmniSharp/coreclr-debug
Browse files Browse the repository at this point in the history
Incorproate coreclr-debug into omnisharp extension (rebasing @chuckries's work against 'dev' branch)
  • Loading branch information
DustinCampbell committed Feb 26, 2016
2 parents 9170e92 + 067c9cc commit 3847c9f
Show file tree
Hide file tree
Showing 10 changed files with 478 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
bin
node_modules
out

*.vsix
13 changes: 13 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
**/*.gitignore
tsconfig.json

src/**
**/*.map

.vscode/**

coreclr-debug/debugAdapters/**
coreclr-debug/bin/**
coreclr-debug/obj/**
coreclr-debug/project.lock.json
coreclr-debug/install.log
5 changes: 5 additions & 0 deletions coreclr-debug/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bin
obj
project.lock.json
debugAdapters
install.log
10 changes: 10 additions & 0 deletions coreclr-debug/NuGet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="dotnet-core" value="https://www.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="coreclr-debug" value="https://www.myget.org/F/coreclr-debug/api/v3/index.json" />
</packageSources>
</configuration>
13 changes: 13 additions & 0 deletions coreclr-debug/dummy.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;

namespace Dummy
{
class Dummy
{
static void Main(string[] args) {
// empty boilerplate required by dotnet build/publish to emit an entry point
// The entrypoint created is dummy[.exe], which we rename to OpenDebugAD7[.exe]
// The generated entry point will then run OpenDebugAD7.dll for us
}
}
}
33 changes: 33 additions & 0 deletions coreclr-debug/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "dummy",
"compilationOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.VisualStudio.clrdbg": "14.0.25025-preview-2839567",
"Microsoft.VisualStudio.clrdbg.MIEngine": "14.0.30225-preview-2",
"Microsoft.VisualStudio.OpenDebugAD7": "1.0.20225-preview-2",
"NETStandard.Library": "1.0.0-rc3-23819",
"Newtonsoft.Json": "7.0.1",
"Microsoft.VisualStudio.Debugger.Interop.Portable": "1.0.1",
"System.Collections.Specialized": "4.0.1-rc3-23819",
"System.Collections.Immutable": "1.2.0-rc3-23819",
"System.Diagnostics.Process" : "4.1.0-rc3-23819",
"System.Diagnostics.StackTrace": "4.0.1-rc3-23819",
"System.Dynamic.Runtime": "4.0.11-rc3-23819",
"Microsoft.CSharp": "4.0.1-rc3-23819",
"System.Threading.Tasks.Dataflow": "4.6.0-rc3-23819",
"System.Threading.Thread": "4.0.0-rc3-23819",
"System.Xml.XDocument": "4.0.11-rc3-23819",
"System.Xml.XmlDocument": "4.0.1-rc3-23819",
"System.Xml.XmlSerializer": "4.0.11-rc3-23819",
"System.ComponentModel": "4.0.1-rc3-23819",
"System.ComponentModel.Annotations": "4.1.0-rc3-23819",
"System.ComponentModel.EventBasedAsync": "4.0.11-rc3-23819",
"System.Runtime.Serialization.Primitives": "4.1.0-rc3-23819",
"System.Net.Http": "4.0.1-rc3-23819"
},
"frameworks": {
"dnxcore50": { }
}
}
224 changes: 223 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"tslint-microsoft-contrib": "^2.0.0"
},
"engines": {
"vscode": "^0.10.1"
"vscode": "^0.10.10"
},
"activationEvents": [
"onLanguage:csharp",
Expand Down Expand Up @@ -128,6 +128,228 @@
"language": "csharp",
"path": "./snippets/csharp.json"
}
],
"debuggers": [
{
"type": "coreclr",
"label": ".NET Core",
"enableBreakpointsFor": { "languageIds": [ "csharp" ] },

"program": "./coreclr-debug/debugAdapters/OpenDebugAD7",
"windows": {
"program": "./coreclr-debug/debugAdapters/OpenDebugAD7.exe"
},

"configurationAttributes": {
"launch": {
"required": [ "program", "cwd" ],
"properties": {
"program": {
"type": "string",
"description": "Path to the program (executable file) to launch. On Windows, a '.exe' suffix is appended if not specified already.",
"default": "${workspaceRoot}/bin/Debug/dnxcore50/<My-Project-Name>"
},
"cwd": {
"type": "string",
"description": "Path to the working directory of the program being debugged. Default is the current workspace.",
"default": "${workspaceRoot}"
},
"args": {
"type": "array",
"description": "Command line arguments passed to the program.",
"items": { "type": "string" },
"default": [ ]
},
"stopAtEntry": {
"type": "boolean",
"description": "If true, the debugger should stop at the entry point of the target.",
"default": false
},
"launchBrowser": {
"type": "object",
"description": "Describes options to launch a web browser as part of launch",
"default": {
"enabled": true,
"args": "${auto-detect-url}",
"windows": {
"command": "cmd.exe",
"args": "/C start ${auto-detect-url}"
},
"osx": {
"command": "open"
},
"linux": {
"command": "xdg-open"
}
},
"properties": {
"enabled": {
"type": "boolean",
"description": "Whether web browser launch is enabled",
"default": true
},
"args": {
"type": "string",
"description": "The arguments to pass to the command to open the browser. Use ${auto-detect-url} to automatically use the address the server is listening to",
"default": "${auto-detect-url}"
},
"osx": {
"type": "object",
"description": "OSX-specific web launch configuration options",
"default": {
"command": "open"
},
"properties": {
"command": {
"type": "string",
"description": "The command to execute for launching the web browser",
"default": "open"
},
"args": {
"type": "string",
"description": "The arguments to pass to the command to open the browser. Use ${auto-detect-url} to automatically use the address the server is listening to",
"default": "${auto-detect-url}"
}
}
},
"linux": {
"type": "object",
"description": "Linux-specific web launch configuration options",
"default": {
"command": "xdg-open"
},
"properties": {
"command": {
"type": "string",
"description": "The command to execute for launching the web browser",
"default": "xdg-open"
},
"args": {
"type": "string",
"description": "The arguments to pass to the command to open the browser. Use ${auto-detect-url} to automatically use the address the server is listening to",
"default": "${auto-detect-url}"
}
}
},
"windows": {
"type": "object",
"description": "Windows-specific web launch configuration options",
"default": {
"command": "cmd.exe",
"args": "/C start ${auto-detect-url}"
},
"properties": {
"command": {
"type": "string",
"description": "The command to execute for launching the web browser",
"default": "cmd.exe"
},
"args": {
"type": "string",
"description": "The arguments to pass to the command to open the browser. Use ${auto-detect-url} to automatically use the address the server is listening to",
"default": "/C start ${auto-detect-url}"
}
}
}
}
},
"sourceFileMap": {
"type": "object",
"description": "Optional source file mappings passed to the debug engine.",
"default": { }
},
"justMyCode": {
"type": "boolean",
"description": "Optional flag to only show user code.",
"default": true
},
"symbolPath": {
"type": "array",
"description": "Array of directories to use 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. Example: '[ \"/Volumes/symbols\" ]",
"items": { "type": "string" },
"default": [ ]
}
}
},
"attach": {
"required": [ ],
"properties": {
"processName": {
"type": "string",
"description": "",
"default": "The process name to attach to. If this is used, 'processId' should not be used."
},
"processId": {
"type": "integer",
"description": "The process id to attach to. If this is used, 'processName' should not be used.",
"default": ""
},
"sourceFileMap": {
"type": "object",
"description": "Optional source file mappings passed to the debug engine.",
"default": { }
},
"justMyCode": {
"type": "boolean",
"description": "Optional flag to only show user code.",
"default": true
},
"symbolPath": {
"type": "array",
"description": "Array of directories to use 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. Example: '[ \"~/symbols\" ]",
"items": { "type": "string" },
"default": [ ]
}
}
}
},

"initialConfigurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceRoot}/bin/Debug/dnxcore50/<My-Project-Name>",
"args": [ ],
"cwd": "${workspaceRoot}",
"stopAtEntry": false,
"sourceFileMap": { }
},
{
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceRoot}/bin/Debug/dnxcore50/<My-Project-Name>",
"args": [ ],
"cwd": "${workspaceRoot}",
"stopAtEntry": false,
"sourceFileMap": { },
"launchBrowser": {
"enabled": true,
"args": "${auto-detect-url}",
"windows": {
"command": "cmd.exe",
"args": "/C start ${auto-detect-url}"
},
"osx": {
"command": "open"
},
"linux": {
"command": "xdg-open"
}
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processName": "<example>",
"sourceFileMap": { }
}
]
}
]
}
}
Loading

0 comments on commit 3847c9f

Please sign in to comment.