Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed custom debug request handling. #9131

Merged

Conversation

kittaakos
Copy link
Contributor

@kittaakos kittaakos commented Feb 26, 2021

Forward the body instead of the response object.

Signed-off-by: Akos Kitta [email protected]

What it does

Fixes the custom debug message handling. Instead of forwarding the response object, it forwards the body of a success response.

How to test

Try with the Cortex-Debug VS Code extension, you should see reasonable responses, instead of an error:

Error:

ERROR [hosted-plugin: 45346] Promise rejection not handled in one second: TypeError: regInfo.forEach is not a function , reason: TypeError: regInfo.forEach is not a function
With stack trace: TypeError: regInfo.forEach is not a function
    at RegisterTreeProvider.createRegisters (/path/to/my/app/plugins/cortex-debug/extension/dist/extension.js:48309:33)
    at /path/to/my/app/plugins/cortex-debug/extension/dist/extension.js:48281:42
    at processTicksAndRejections (internal/process/task_queues.js:94:5)

Related code in VS Code extension:
https://github.com/Marus/cortex-debug/blob/35f42186726063bcb150f2e4132556a7528eea60/src/frontend/views/registers.ts#L27-L30

With the fix, you can see the custom view contribution with the content from the cortex-debug VSX:

Screen Shot 2021-03-01 at 10 24 27

Review checklist

Reminder for reviewers

Forward the `body` instead of the `response` object.

Signed-off-by: Akos Kitta <[email protected]>
@kittaakos kittaakos requested a review from tolusha February 26, 2021 13:58
@vince-fugnitto vince-fugnitto added debug issues that related to debug functionality vscode issues related to VSCode compatibility labels Feb 26, 2021
@kittaakos
Copy link
Contributor Author

@tolusha, as the original contributor of the core, could you review my changes please? Thank you!

@tolusha
Copy link
Contributor

tolusha commented Mar 2, 2021

@kittaakos
For me it looks good.
But I've not committed anything in Theia for a long time.
So, I might not be up to date with the current status of the project.

@kittaakos
Copy link
Contributor Author

Thank you so much for the review, @tolusha 👍

So, I might not be up to date with the current status of the project.

If anything breaks, I am going to take care of fixing it.

@kittaakos kittaakos merged commit 794fd92 into eclipse-theia:master Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug issues that related to debug functionality vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants