-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into 'master'
Develop See merge request company-projects/Meadow!52
- Loading branch information
Showing
13 changed files
with
194 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "build", | ||
"command": "dotnet build", | ||
"type": "shell", | ||
"group": "build", | ||
"presentation": { | ||
"reveal": "silent" | ||
}, | ||
"problemMatcher": "$msCompile" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import * as vscode from 'vscode'; | ||
import { DEBUG_SESSION_ID, SOLIDITY_MEADOW_TYPE } from './constants'; | ||
import * as uuid from 'uuid/v1'; | ||
import { Logger } from './logger'; | ||
import * as common from './common'; | ||
|
||
export class ClrDebugConfigProvider implements vscode.DebugConfigurationProvider { | ||
|
||
private _context: vscode.ExtensionContext; | ||
|
||
constructor(context: vscode.ExtensionContext) { | ||
this._context = context; | ||
} | ||
|
||
/** | ||
* Provides initial [debug configuration](#DebugConfiguration). If more than one debug configuration provider is | ||
* registered for the same type, debug configurations are concatenated in arbitrary order. | ||
* | ||
* @param folder The workspace folder for which the configurations are used or undefined for a folderless setup. | ||
* @param token A cancellation token. | ||
* @return An array of [debug configurations](#DebugConfiguration). | ||
*/ | ||
provideDebugConfigurations?(folder: vscode.WorkspaceFolder | undefined, token?: vscode.CancellationToken): vscode.ProviderResult<vscode.DebugConfiguration[]> { | ||
// We have nothing to add here. Implemented to just fulfill the interface. | ||
return []; | ||
} | ||
|
||
/** | ||
* Resolves a [debug configuration](#DebugConfiguration) by filling in missing values or by adding/changing/removing attributes. | ||
* If more than one debug configuration provider is registered for the same type, the resolveDebugConfiguration calls are chained | ||
* in arbitrary order and the initial debug configuration is piped through the chain. | ||
* Returning the value 'undefined' prevents the debug session from starting. | ||
* | ||
* @param folder The workspace folder from which the configuration originates from or undefined for a folderless setup. | ||
* @param debugConfiguration The [debug configuration](#DebugConfiguration) to resolve. | ||
* @param token A cancellation token. | ||
* @return The resolved debug configuration or undefined. | ||
*/ | ||
resolveDebugConfiguration?(folder: vscode.WorkspaceFolder | undefined, debugConfiguration: vscode.DebugConfiguration, token?: vscode.CancellationToken): vscode.ProviderResult<vscode.DebugConfiguration> { | ||
|
||
// Check if the solidity debugger has already been launched and set the session ID | ||
if (debugConfiguration.env && debugConfiguration.env[DEBUG_SESSION_ID]) { | ||
return debugConfiguration; | ||
} | ||
|
||
let config : any = debugConfiguration; | ||
if (!config.env) { | ||
config.env = {}; | ||
} | ||
|
||
let debugSessionID = uuid(); | ||
config.env[DEBUG_SESSION_ID] = debugSessionID; | ||
|
||
let workspaceFolder = common.getWorkspaceFolder(); | ||
|
||
let unitTestRunnerDebugConfig: vscode.DebugConfiguration = { | ||
name: "Solidity Debugger", | ||
type: SOLIDITY_MEADOW_TYPE, | ||
request: "launch", | ||
cwd: workspaceFolder.uri.fsPath, | ||
[DEBUG_SESSION_ID]: debugSessionID | ||
}; | ||
|
||
Logger.log(`Launching dotnet debugger for: ${JSON.stringify(unitTestRunnerDebugConfig)}`); | ||
|
||
vscode.debug.startDebugging(workspaceFolder, unitTestRunnerDebugConfig); | ||
|
||
return config; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.