Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

When delve fails, stop the debug sessions #774

Merged
merged 2 commits into from
Feb 6, 2017

Conversation

ramya-rao-a
Copy link
Contributor

Fixes #492

@@ -268,9 +269,11 @@ class Delve {
connectClient(port, host);
}
});
let that = this;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure why, but "this" in line 275 does not point to Delve object, it points to the ChildProcess which is why I had to resort to that = this

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use a fat arrow function (code => { ... }) instead of function, then this will be correct

Copy link
Contributor Author

@ramya-rao-a ramya-rao-a Feb 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh ya! doh! I thought I was doing just that... need to get coffee

@@ -268,9 +269,11 @@ class Delve {
connectClient(port, host);
}
});
let that = this;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use a fat arrow function (code => { ... }) instead of function, then this will be correct

@@ -388,6 +391,10 @@ class GoDebugSession extends DebugSession {
this.delve.onstderr = (str: string) => {
this.sendEvent(new OutputEvent(str, 'stderr'));
};
this.delve.onclose = () => {
this.sendErrorResponse(response, 3000, 'Failed to continue: Check the debug console for details.');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 'failed to continue'?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cos it matches with the other message for when the delve.connection fails?

@ramya-rao-a ramya-rao-a merged commit 94ba09f into microsoft:master Feb 6, 2017
@ramya-rao-a ramya-rao-a deleted the no-compile-no-debug branch April 9, 2017 17:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants