fix breakpoints don't trigger when hit (#37)

* add errorcode to empty jdwp results

* use an empty line table if the command request fails
This commit is contained in:
Dave Holoway
2018-11-11 15:20:28 +00:00
committed by GitHub
parent 494bb83cbf
commit 8cc31476b3
2 changed files with 13 additions and 1 deletions

View File

@@ -1425,6 +1425,15 @@ Debugger.prototype = {
cmd: this.JDWP.Commands.lineTable(methodinfo.owningclass, methodinfo),
})
.then(function (linetable, methodinfo) {
// if the request failed, just return a blank table
if (linetable.errorcode) {
linetable = {
errorcode: linetable.errorcode,
start: '00000000000000000000000000000000',
end: '00000000000000000000000000000000',
lines:[],
}
}
// the linetable does not correlate code indexes with line numbers
// - location searching relies on the table being ordered by code indexes
linetable.lines.sort(function (a, b) {

View File

@@ -109,7 +109,10 @@ function _JDWP() {
return;
}
this.decoded = {empty:true};
this.decoded = {
empty: true,
errorcode: this.errorcode,
};
}
this.decodereply = function(ths,s) {