Skip to content

Commit 1ec1b0e

Browse files
authored
Merge pull request #438 from intersystems-community/#414-fix-debugging
Fixed showing variable values in debugger
2 parents d2a2aa1 + 14520dd commit 1ec1b0e

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/debug/debugSession.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ export class ObjectScriptDebugSession extends LoggingDebugSession {
127127
});
128128

129129
const disposeConnection = (error?: Error): void => {
130+
if (!this._connection) {
131+
return;
132+
}
130133
this.sendEvent(new ThreadEvent("exited", this._connection.id));
131134
this._connection.close();
132135
this._connection = null;

src/debug/xdebugConnection.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,8 @@ export class StackFrame {
308308
* @param {Connection} connection
309309
*/
310310
public constructor(stackFrameNode: Element, connection: Connection) {
311-
this.method = stackFrameNode.getAttribute("method");
312-
this.fileUri = stackFrameNode.getAttribute("filename");
311+
this.method = iconv.encode(stackFrameNode.getAttribute("method"), ENCODING) + "";
312+
this.fileUri = iconv.encode(stackFrameNode.getAttribute("filename"), ENCODING) + "";
313313
this.type = stackFrameNode.getAttribute("type");
314314
this.line = parseInt(stackFrameNode.getAttribute("lineno"), 10);
315315
this.methodOffset = parseInt(stackFrameNode.getAttribute("methodoffset"), 10);
@@ -410,7 +410,7 @@ export abstract class BaseProperty {
410410

411411
public constructor(propertyNode: Element) {
412412
if (propertyNode.hasAttribute("name")) {
413-
this.name = propertyNode.getAttribute("name");
413+
this.name = iconv.encode(propertyNode.getAttribute("name"), ENCODING) + "";
414414
}
415415
this.type = propertyNode.getAttribute("type");
416416
if (propertyNode.hasAttribute("classname")) {
@@ -424,7 +424,7 @@ export abstract class BaseProperty {
424424
if (encoding && encoding !== "none") {
425425
this.value = iconv.encode(propertyNode.textContent, encoding) + "";
426426
} else {
427-
this.value = propertyNode.textContent;
427+
this.value = iconv.encode(propertyNode.textContent, ENCODING) + "";
428428
}
429429
}
430430
}

0 commit comments

Comments
 (0)