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

GH-7909: Inline variable values in editor. #7921

Merged
merged 1 commit into from
Jun 24, 2020
Merged

GH-7909: Inline variable values in editor. #7921

merged 1 commit into from
Jun 24, 2020

Conversation

kittaakos
Copy link
Contributor

@kittaakos kittaakos commented May 28, 2020

Closes #7909.

Signed-off-by: Akos Kitta kittaakos@typefox.io

What it does

screencast 2020-05-28 16-41-24

How to test

  • Create a JS module, set a few breakpoints here and there, steps through your module, you can see the inline value decorations,
  • Start another debug session while the previous is up and running, you can see the value decorators get updated when you alter the active debug session,

screencast 2020-06-02 11-04-32

  • Terminate the debug session, decorators are removed.

screencast 2020-06-02 11-07-07

  • Also, close the editor you debug, but do not terminate the debug session. When you reopen the file, the inline value decorations are there.

screencast 2020-06-02 11-03-27

Review checklist

Reminder for reviewers

@akosyakov akosyakov added the debug issues that related to debug functionality label May 29, 2020
@kittaakos kittaakos marked this pull request as ready for review June 2, 2020 09:08
@kittaakos kittaakos changed the title [WIP]: GH-7909: Inline variable values in editor. GH-7909: Inline variable values in editor. Jun 2, 2020
@kittaakos
Copy link
Contributor Author

This PR is ready for the review/preview.

@kittaakos
Copy link
Contributor Author

I am happy to drop the fix for #7918.

@akosyakov
Copy link
Member

akosyakov commented Jun 3, 2020

I am happy to drop the fix for #7918.

I think this state does not belong to the widget, but DebugConfigurationManager. Otherwise there can be race conditions when proper current from the manager is ignored because there is state to restore in the widget. Could we rather implement it there, i.e. store when the current is changed and read at proper time when current is accessed. Maybe with another PR?

@kittaakos
Copy link
Contributor Author

I think this state does not belong to the widget, but DebugConfigurationManager. Otherwise there can be race conditions when proper current from the manager is ignored because there is state to restore in the widget. Could we rather implement it there, i.e. store when the current is changed and read at proper time when current is accessed. Maybe with another PR?

Sure. I hated to reset the desired launch config during the development, so that's why the messy fix.

Regarding the required changes; it is a little bit tricky. There is no clear event on the DebugSessionManager when were the configs loaded. First, we have a config for the current workspace root without any config (we make initialized resolve), then we have a preference change event and we populate the configs for the workspace root.

@akosyakov
Copy link
Member

I meant we could preserve current in https://github.com/eclipse-theia/theia/blob/master/packages/debug/src/browser/debug-configuration-manager.ts and restore it on the initialization, i.e. on first updateModels.

@kittaakos
Copy link
Contributor Author

I meant we could preserve current in https://github.com/eclipse-theia/theia/blob/master/packages/debug/src/browser/debug-configuration-manager.ts and restore it on the initialization, i.e. on first updateModels.

Sure sure, I understood it, as we do for the editor navigation history. I will open a separate PR for that.

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

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

Code changes look good. I've tried to debug our Mocha tests and inline variable values are properly rendered as I step over.

The only question whether we need a CQ for copied code.

@kittaakos
Copy link
Contributor Author

The only question whether we need a CQ for copied code.

I am going to take care of it.

@kittaakos
Copy link
Contributor Author

@marcdumais-work, can you please confirm whether we need a new CQ for this PR or not? Thank you!

// https://github.com/theia-ide/vscode/blob/standalone/0.19.x/src/vs/workbench/contrib/debug/common/debugModel.ts#L324-L335

// Based on https://github.com/theia-ide/vscode/blob/standalone/0.19.x/src/vs/workbench/contrib/debug/browser/debugEditorContribution.ts

@marcdumais-work
Copy link
Contributor

@marcdumais-work, can you please confirm whether we need a new CQ for this PR or not?

Hi @kittaakos ,

I believe so - AFAIK we've never requested these files examined for "forking" (CQ type B). Please use links to the upstream vscode repo when opening the CQ.

@marcdumais-work
Copy link
Contributor

Also, please add the Microsoft copyright header in file: debug-stack-frame.tsx like you did for the other file.

@kittaakos
Copy link
Contributor Author

Also, please add the Microsoft copyright header in file: debug-stack-frame.tsx like you did for the other file.

Good point, thanks!

Closes #7909.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
@kittaakos kittaakos added the CQ Required (deprecated) issues requiring a CQ (contributor questionnaire) label Jun 4, 2020
@kittaakos
Copy link
Contributor Author

CQ: https://dev.eclipse.org/ipzilla/show_bug.cgi?id=22247

@marcdumais-work
Copy link
Contributor

I gave this PR a quick try on Gitpod. I installed vscode-clangd and cdt-gdb-vscode from the extensions view and used the test workspace and launch config from here.

It worked nicely!

image

@kittaakos
Copy link
Contributor Author

@marcdumais-work, how long does it usually take to get a CQ approved? I have seen an almost prompt approval (with the + sign) on Bugzilla, but nothing has happened since then. The workflow state is the same. I do not have much experience with CQs 😕 could you please check whether the one for this PR is going in the good direction. Thank you!

@marcdumais-work
Copy link
Contributor

@marcdumais-work, how long does it usually take to get a CQ approved? I have seen an almost prompt approval (with the + sign) on Bugzilla, but nothing has happened since then. The workflow state is the same. I do not have much experience with CQs could you please check whether the one for this PR is going in the good direction. Thank you!

The CQ above looks good - it has one approval so far from a PMC member. It has been opened 2 work days ago, so I'd give it a couple more, and then "ping" on the CQ itself if still unresolved.

@kittaakos
Copy link
Contributor Author

@marcdumais-work, does it make sense to ask about the CQ on Bugzilla?

@marcdumais-work
Copy link
Contributor

@marcdumais-work, does it make sense to ask about the CQ on Bugzilla?

I am not sure that there is a better way. I remember @akosyakov having some success with pinging. Let me give it a try.

@akosyakov
Copy link
Member

Maybe already vacation time 🌴

@kittaakos
Copy link
Contributor Author

We have an update, I can see:

You may proceed to check the content into the Eclipse repository.

And also

We will perform a comprehensive analysis at a later date based on IP work queue.

Is it yes or no? 😕

@akosyakov
Copy link
Member

akosyakov commented Jun 24, 2020

We can merge when CQ has checkin label. It does, so you can proceed!

@kittaakos kittaakos merged commit c837b6c into master Jun 24, 2020
@kittaakos
Copy link
Contributor Author

Thank you all for the help on this PR.

@kittaakos kittaakos deleted the GH-7909 branch June 24, 2020 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CQ Required (deprecated) issues requiring a CQ (contributor questionnaire) debug issues that related to debug functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[monaco][debug] Inline variable values in source code
3 participants