Skip to content

Commit

Permalink
Merge branch 'develop' into 'master'
Browse files Browse the repository at this point in the history
Develop

See merge request company-projects/Meadow!49
  • Loading branch information
zone117x committed Oct 9, 2018
2 parents db6f7e2 + edec00c commit 085c5a7
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ protected override void HandleContinueRequestAsync(IRequestResponder<ContinueArg

protected override void HandleReverseContinueRequestAsync(IRequestResponder<ReverseContinueArguments> responder)
{
base.HandleReverseContinueRequestAsync(responder);
responder.SetResponse(new ReverseContinueResponse());
}

protected override void HandlePauseRequestAsync(IRequestResponder<PauseArguments> responder)
Expand Down
28 changes: 18 additions & 10 deletions src/Meadow.VSCode.Debugger/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/Meadow.VSCode.Debugger/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "solidity-debugger",
"displayName": "Solidity Debugger",
"version": "0.0.3",
"version": "0.0.4",
"description": "Debugger for Solidity smart contracts - powered by the Meadow testing and development tool suite",
"categories": [
"Debuggers"
Expand Down Expand Up @@ -47,13 +47,13 @@
"dependencies": {
"semver": "^5.5.1",
"uuid": "^3.3.2",
"vscode-debugadapter": "^1.31.0",
"vscode-debugprotocol": "^1.31.0"
"vscode-debugadapter": "^1.32.1",
"vscode-debugprotocol": "^1.32.0"
},
"devDependencies": {
"@types/node": "^8.10.0",
"tslint": "^5.11.0",
"typescript": "^3.0.3",
"typescript": "^3.1.1",
"vsce": "^1.51.1",
"vscode": "^1.1.21",
"vscode-debugadapter-testsupport": "^1.31.0",
Expand Down
22 changes: 21 additions & 1 deletion src/Meadow.VSCode.Debugger/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,29 @@ export interface ISolidityMeadowDebugConfig extends vscode.DebugConfiguration {
}

export interface IDebugAdapterExecutable {
readonly type?: 'executable';
readonly type: 'executable';

/**
* The command path of the debug adapter executable.
* A command must be either an absolute path or the name of an executable looked up via the PATH environment variable.
* The special value 'node' will be mapped to VS Code's built-in node runtime.
*/
readonly command: string;

/**
* Optional arguments passed to the debug adapter executable.
*/
readonly args: string[];

/**
* The additional environment of the executed program or shell. If omitted
* the parent process' environment is used. If provided it is merged with
* the parent process' environment.
*/
readonly env?: { [key: string]: string };

/**
* The working directory for the debug adapter.
*/
readonly cwd?: string;
}
4 changes: 3 additions & 1 deletion src/Meadow.VSCode.Debugger/src/debugAdapterExecutable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as fs from 'fs';
import * as path from 'path';
import { IDebugAdapterExecutable, ISolidityMeadowDebugConfig } from './constants';
import { Logger } from './logger';
import { SOLIDITY_MEADOW_TYPE } from './constants';

export async function resolveMeadowDebugAdapter(context: vscode.ExtensionContext, debugSessionID: string, debugConfig?: ISolidityMeadowDebugConfig): Promise<IDebugAdapterExecutable> {

Expand Down Expand Up @@ -39,7 +40,8 @@ export async function resolveMeadowDebugAdapter(context: vscode.ExtensionContext

args.push("--session", debugSessionID);

let launchInfo = {
let launchInfo : IDebugAdapterExecutable = {
type: "executable",
command: "dotnet",
args: args,
env: { "DEBUG_SESSION_ID": debugSessionID }
Expand Down
8 changes: 8 additions & 0 deletions src/Meadow.VSCode.Debugger/src/debugConfigProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ export class SolidityMeadowConfigurationProvider implements vscode.DebugConfigur
this._context = context;
}

provideDebugAdapter?(session: vscode.DebugSession, folder: vscode.WorkspaceFolder | undefined, executable: IDebugAdapterExecutable | undefined, config: vscode.DebugConfiguration, token?: vscode.CancellationToken): vscode.ProviderResult<IDebugAdapterExecutable> {
let debugSessionID: string = uuid();

dotnetLaunchDebug.launch(debugSessionID, this._debugConfig).catch(err => Logger.log("Error launching dotnet test", err));

return resolveMeadowDebugAdapter(this._context, debugSessionID, this._debugConfig);
}

// Notice: this is working in latest stable vscode but is preview.
// Keep the 'getDebuggerPath' command method intact in case its ever removed or broken for this use case.
debugAdapterExecutable(folder: vscode.WorkspaceFolder | undefined, token?: vscode.CancellationToken): vscode.ProviderResult<IDebugAdapterExecutable> {
Expand Down

0 comments on commit 085c5a7

Please sign in to comment.