add trace support (#38)

* add basic support for sending console logs to OutputWindow

* add trace config setting

* standardise logs
This commit is contained in:
Dave Holoway
2018-11-11 17:57:32 +00:00
committed by GitHub
parent 8cc31476b3
commit de8abc62bc
5 changed files with 35 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
const $ = require('./jq-promise');
const { atob,btoa,D,getutf8bytes,fromutf8bytes,intToHex } = require('./util');
const { btoa,D,E,getutf8bytes,fromutf8bytes,intToHex } = require('./util');
/*
JDWP - The Java Debug Wire Protocol
*/
@@ -96,8 +96,8 @@ function _JDWP() {
return;
}
if (this.errorcode != 0) {
console.error("Command failed: error " + this.errorcode, this);
if (this.errorcode !== 0) {
E(`JDWP command failed '${this.command.name}'. Error ${this.errorcode}`, this);
}
if (!this.errorcode && this.command && this.command.replydecodefn) {