diff --git a/CHANGELOG.md b/CHANGELOG.md index bb5d7da..00f3ca8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 0.2.1 +- add log message function; +- solve the problem of parsing two-dimensional arrays failure; # 0.2.0 - support qt variable; - fix the problem of step out fail from main(); diff --git a/package.json b/package.json index 346818a..63c3ebc 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "debug" ], "license": "public domain", - "version": "0.2.0", + "version": "0.2.1", "publisher": "KylinIDETeam", "icon": "images/native-debug.png", "engines": { diff --git a/src/backend/mi2/mi2.ts b/src/backend/mi2/mi2.ts index 554dd8f..e810d10 100644 --- a/src/backend/mi2/mi2.ts +++ b/src/backend/mi2/mi2.ts @@ -81,7 +81,9 @@ export class MI2 extends EventEmitter implements IBackend { protected logMsg: Breakpoint[] = []; protected logMsgNum = 0; protected logMsgVar = ""; + protected logMsgVarProcess = ""; protected logMsgRplNum = 0; + protected logMsgRplItem: string[] = []; load(cwd: string, target: string, procArgs: string, separateConsole: string): Thenable { if (!path.isAbsolute(target)) target = path.join(cwd, target); @@ -394,12 +396,15 @@ export class MI2 extends EventEmitter implements IBackend { let content = record.content; const variableMatch = logMsgMatch.exec(content) let value = content.substr(variableMatch[1].length).trim(); - - const result = this.logMsgVar.replace(logReplace, value); + this.logMsgRplItem.push(value); + // const result = this.logMsgVar.replace(logReplace, value); + // this.logMsgVar = result; this.logMsgRplNum--; - this.logMsgVar = result; if(this.logMsgRplNum == 0){ - this.log("console", "Log Message:" + this.logMsgVar); + for(let i=0; i App6: +++++++++:" + this.logMsgNum + ":" + record.content + ":" + this.logMsgVar); @@ -451,6 +456,8 @@ export class MI2 extends EventEmitter implements IBackend { const matches = this.logMsgVar.match(logReplaceTest); const count = matches ? matches.length : 0; this.logMsgRplNum = count; + this.logMsgVarProcess = this.logMsgVar.replace(logReplaceTest, "placeholderxxvvxx"); + this.logMsgRplItem = []; } }); break; @@ -670,7 +677,7 @@ export class MI2 extends EventEmitter implements IBackend { } setLogPoint(bkptNum, command): Thenable { - this.log("stderr", `setLogoPoint : ` + command); + // this.log("stderr", `setLogoPoint : ` + command); const regex = /{([a-z0-9A-Z-_\.\>\&\*]*)}/gm; // Alternative syntax using RegExp constructor