-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b117c48
commit a74287c
Showing
11 changed files
with
198 additions
and
86 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
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,67 @@ | ||
const vscode = require('vscode'); | ||
const path = require("path"); | ||
const fs = require("fs"); | ||
const cp = require("child_process"); | ||
const os = require("os"); | ||
const localize = require("./myLocalize.js").localize; | ||
const getAllWorkspaceFiles = require("./utils.js").getAllWorkspaceFiles; | ||
const taskProvider = require('./taskProvider.js'); | ||
|
||
class HarbourDBGProvider { | ||
provideDebugConfigurations(folder,token) { | ||
return new getAllWorkspaceFiles(token).then((values)=>{ | ||
var retValue = [{ | ||
"type": "harbour-dbg", | ||
"request": "launch", | ||
"name": "Launch currentFile", | ||
"preLaunchTask": localize("harbour.task.HBMK2.provideName3") | ||
}]; | ||
if(token.isCancellationRequested) { | ||
return; | ||
} | ||
for(let j=0;j<values.length;j++) { | ||
let ff = values[j]; | ||
for(let i=0;i<ff.length;++i) { | ||
if(!ff[i].isFile()) continue; | ||
var ext = path.extname(ff[i].name).toLowerCase(); | ||
if(ext==".hbp") { | ||
var debugInfo = { | ||
"type": "harbour-dbg", | ||
"request": "launch", | ||
"name": "Launch currentFile", | ||
"preLaunchTask": localize("harbour.task.HBMK2.provideName",path.basename(ff[i].name)) | ||
}; | ||
retValue.push(debugInfo); | ||
} | ||
} | ||
} | ||
return retValue; | ||
}); | ||
} | ||
|
||
resolveDebugConfiguration(folder, debugConfiguration, token) { | ||
/* | ||
var textDocument = {uri: {fsPath:""}}; | ||
if(vscode && vscode.window && vscode.window.activeTextEditor && vscode.window.activeTextEditor.document) | ||
textDocument =vscode.window.activeTextEditor.document; | ||
var task = new vscode.Task({ | ||
"type": "HBMK2", | ||
"input": "${file}", | ||
"debugSymbols": true, | ||
"output": "${fileBasenameNoExtension}_dbg" | ||
}, vscode.TaskScope.Global, localize("harbour.task.HBMK2.provideName3") ,"HBMK2"); | ||
*/ | ||
return { | ||
"type": "harbour-dbg", | ||
"request": "launch", | ||
"name": "Launch currentFile", | ||
"preLaunchTask": localize("harbour.task.HBMK2.provideName3") | ||
}; | ||
} | ||
} | ||
|
||
function activate() { | ||
vscode.debug.registerDebugConfigurationProvider("harbour-dbg", new HarbourDBGProvider()); | ||
} | ||
|
||
exports.activate = activate; |
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
Oops, something went wrong.