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

When delve fails, stop the debug sessions#774

Merged
ramya-rao-a merged 2 commits intomicrosoft:masterfrom
ramya-rao-a:no-compile-no-debug
Feb 6, 2017
Merged

When delve fails, stop the debug sessions#774
ramya-rao-a merged 2 commits intomicrosoft:masterfrom
ramya-rao-a:no-compile-no-debug

Conversation

@ramya-rao-a
Copy link
Copy Markdown
Contributor

Fixes #492

Comment thread src/debugAdapter/goDebug.ts Outdated
connectClient(port, host);
}
});
let that = this;
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Comment thread src/debugAdapter/goDebug.ts Outdated
connectClient(port, host);
}
});
let that = this;
Copy link
Copy Markdown
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

this.sendEvent(new OutputEvent(str, 'stderr'));
};
this.delve.onclose = () => {
this.sendErrorResponse(response, 3000, 'Failed to continue: Check the debug console for details.');
Copy link
Copy Markdown
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
Copy Markdown
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