Skip to content

Commit

Permalink
Add onDebug activate event
Browse files Browse the repository at this point in the history
  • Loading branch information
tolusha committed Jul 9, 2019
1 parent cb2c93a commit f0ae85a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.DS_Store
node_modules
build
lib
*.log
.idea
.metadata
*.iml
.Trash-*
out
adapter
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
"tslint": "^5.12.1",
"vscode-test": "^1.0.0-next.0"
},
"activationEvents": [
"onDebug"
],
"contributes": {
"debuggers": [
{
Expand Down Expand Up @@ -66,7 +69,7 @@
"label": "Pig Debug: Launch",
"description": "A new configuration for launching a Pig debug",
"body": {
"type": "pig",
"type": "pig-debug",
"request": "launch",
"name": "Debugging a pig file",
"stopOnEntry": true,
Expand Down
8 changes: 3 additions & 5 deletions src/extension.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
// The module 'vscode' contains the VS Code extensibility API
// The module 'vscode' contains the VS Code extsensibility API
// Import the module and reference it with the alias vscode in your code below
import * as path from 'path';
import * as vscode from 'vscode';
import { DebugConfigurationProvider, PIG_DEBUG } from './debug-configuration-provider';

export function activate(context: vscode.ExtensionContext) {
vscode.commands.registerCommand('pig.adapterExecutable', () => provideDebugAdapterExecutable());

vscode.debug.registerDebugConfigurationProvider(PIG_DEBUG,
new DebugConfigurationProvider());
context.subscriptions.push(vscode.commands.registerCommand('pig.adapterExecutable', () => provideDebugAdapterExecutable()));
vscode.debug.registerDebugConfigurationProvider(PIG_DEBUG, new DebugConfigurationProvider());
}

function provideDebugAdapterExecutable(): any {
Expand Down

0 comments on commit f0ae85a

Please sign in to comment.