Add binary extension. (#3)

This commit is contained in:
Yaohai Zheng 2017-09-11 16:49:45 +08:00 committed by GitHub
parent 8434cc28e5
commit 2dc3a4975f
4 changed files with 156 additions and 120 deletions

View File

@ -4,5 +4,6 @@ out/test/**
test/**
src/**
**/*.map
.gitignore
tsconfig.json
gulpfile.js
.gitignore

View File

@ -1,8 +1,28 @@
const gulp = require("gulp");
const cp = require('child_process');
const tslint = require("gulp-tslint");
const copy = require("gulp-copy");
const server_dir = '../java-debug';
gulp.task("tslint", () => {
return gulp.src(["**/*.ts", "!**/*.d.ts", "!node_modules/**", "!./src/views/node_modules/**"])
.pipe(tslint())
.pipe(tslint.report());
});
return gulp.src(["**/*.ts", "!**/*.d.ts", "!node_modules/**", "!./src/views/node_modules/**"])
.pipe(tslint())
.pipe(tslint.report());
});
gulp.task('build_server', () => {
cp.execSync(mvnw() + ' clean package', {
cwd: server_dir,
stdio: [0, 1, 2]
});
gulp.src(server_dir + '/com.microsoft.java.debug.plugin/target/com.microsoft.java.debug.*.jar')
.pipe(copy('./server', {
prefix: 4
}))
.pipe(gulp.dest('.'));
});
function mvnw() {
return "mvn";
}

15
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "vscode-java-debugger",
"version": "0.0.1",
"name": "vscode-java-debug",
"version": "0.1.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -1208,6 +1208,17 @@
"through2": "2.0.3"
}
},
"gulp-copy": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/gulp-copy/-/gulp-copy-1.0.1.tgz",
"integrity": "sha512-uhIdHo9SoWkf+pjfjETOMD/6ez10ZItO5/L1bFRfVGH+7lq9zE3TSjkh3WVPuTS9ttPRHA7yW4g1QRE1hPwUOA==",
"dev": true,
"requires": {
"gulp": "3.9.1",
"gulp-util": "3.0.8",
"through2": "2.0.3"
}
},
"gulp-filter": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/gulp-filter/-/gulp-filter-5.0.1.tgz",

View File

@ -15,120 +15,123 @@
],
"main": "./out/src/extension",
"contributes": {
"javaExtensions": [],
"javaExtensions": ["./server/com.microsoft.java.debug.plugin-0.1.0-SNAPSHOT.jar"],
"commands": [],
"debuggers": [{
"type": "java",
"label": "Java",
"startSessionCommand": "vscode.java.startDebugSession",
"enableBreakpointsFor": {
"languageIds": [
"java"
"debuggers": [
{
"type": "java",
"label": "Java",
"startSessionCommand": "vscode.java.startDebugSession",
"enableBreakpointsFor": {
"languageIds": [
"java"
]
},
"configurationAttributes": {
"launch": {
"required": [
"mainClass"
],
"properties": {
"projectName": {
"type": "string",
"description": "Name of the project that contains the main class (optional, only required when the main class resides in multiple projects).",
"default": ""
},
"mainClass": {
"type": "string",
"description": "The main class of the program (fully qualified name, e.g. com.xyz.MainClass).",
"default": ""
},
"args": {
"type": "string",
"description": "The command line arguments passed to the program.",
"default": ""
},
"vmArgs": {
"type": "string",
"description": "The java options and system properties passed to the JVM launcher (e.g. -Xms<size> -Xmx<size> -D<name>=<value>).",
"default": ""
},
"classPaths": {
"type": "array",
"items": {
"type": "string"
},
"description": "The classpaths passed to the JVM launcher (if not specified, debugger will resolve them automatically from the project configuration).",
"default": []
},
"sourcePaths": {
"type": "array",
"items": {
"type": "string"
},
"description": "The source directories of the program.",
"default": []
}
}
},
"attach": {
"required": [
"hostName",
"port"
],
"properties": {
"hostName": {
"type": "string",
"default": "localhost",
"description": "The host name or ip address of remote debuggee."
},
"port": {
"type": "number",
"description": "The debug port of remote debuggee."
},
"timeout": {
"type": "number",
"default": 30000,
"description": "Timeout value before reconnecting, in milliseconds (default to 30000ms)."
},
"sourcePaths": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "The source directories of the program."
},
"projectName": {
"type": "string",
"description": "Name of the project that contains the main class (optional, only required when the main class resides in multiple projects).",
"default": ""
}
}
}
},
"initialConfigurations": [
{
"type": "java",
"name": "Debug (Launch)",
"request": "launch",
"mainClass": "",
"args": "",
"sourcePaths": [
"${workspaceRoot}"
]
},
{
"type": "java",
"name": "Debug (Attach)",
"request": "attach",
"hostName": "localhost",
"port": 0,
"timeout": 30000,
"sourcePaths": [
"${workspaceRoot}"
]
}
]
},
"configurationAttributes": {
"launch": {
"required": [
"mainClass"
],
"properties": {
"projectName": {
"type": "string",
"description": "Name of the project that contains the main class (optional, only required when the main class resides in multiple projects).",
"default": ""
},
"mainClass": {
"type": "string",
"description": "The main class of the program (fully qualified name, e.g. com.xyz.MainClass).",
"default": ""
},
"args": {
"type": "string",
"description": "The command line arguments passed to the program.",
"default": ""
},
"vmArgs": {
"type": "string",
"description": "The java options and system properties passed to the JVM launcher (e.g. -Xms<size> -Xmx<size> -D<name>=<value>).",
"default": ""
},
"classPaths": {
"type": "array",
"items": {
"type": "string"
},
"description": "The classpaths passed to the JVM launcher (if not specified, debugger will resolve them automatically from the project configuration).",
"default": []
},
"sourcePaths": {
"type": "array",
"items": {
"type": "string"
},
"description": "The source directories of the program.",
"default": []
}
}
},
"attach": {
"required": [
"hostName",
"port"
],
"properties": {
"hostName": {
"type": "string",
"default": "localhost",
"description": "The host name or ip address of remote debuggee."
},
"port": {
"type": "number",
"description": "The debug port of remote debuggee."
},
"timeout": {
"type": "number",
"default": 30000,
"description": "Timeout value before reconnecting, in milliseconds (default to 30000ms)."
},
"sourcePaths": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "The source directories of the program."
},
"projectName": {
"type": "string",
"description": "Name of the project that contains the main class (optional, only required when the main class resides in multiple projects).",
"default": ""
}
}
}
},
"initialConfigurations": [{
"type": "java",
"name": "Debug (Launch)",
"request": "launch",
"mainClass": "",
"args": "",
"sourcePaths": [
"${workspaceRoot}"
]
},
{
"type": "java",
"name": "Debug (Attach)",
"request": "attach",
"hostName": "localhost",
"port": 0,
"timeout": 30000,
"sourcePaths": [
"${workspaceRoot}"
]
}
]
}]
}
]
},
"scripts": {
"vscode:prepublish": "tsc -p ./",
@ -143,10 +146,11 @@
"@types/mocha": "^2.2.32",
"@types/node": "^6.0.40",
"gulp": "^3.9.1",
"gulp-copy": "^1.0.1",
"gulp-tslint": "^8.1.2",
"mocha": "^2.3.3",
"tslint": "^5.7.0",
"typescript": "^2.0.3",
"vscode": "^1.1.5"
}
}
}