Skip to content

Conversation

@mahmoudsalah1993
Copy link
Contributor

…the appropriate language debugger.

Resolves #201596

The debug view's welcome state shows an Open a file which can be debugged or run when a supported file is open while in diff view. Instead for diff editors resolve the underlying original editor to allow launching debuggers with resolved language debugger when in diff view.

image

const editorControl = this.editorService.activeTextEditorControl;
let editorControl = this.editorService.activeTextEditorControl;
if (isDiffEditor(editorControl)) {
editorControl = editorControl.getOriginalEditor();
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this look at the modified editor? I think I want to debug the one on the right.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good point, I missed the possibility that the user might edit the language for the file, updated.

@roblourens roblourens added this to the December / January 2024 milestone Dec 29, 2023
@roblourens roblourens enabled auto-merge (squash) December 31, 2023 07:28
@roblourens roblourens merged commit df8db3a into microsoft:main Dec 31, 2023
@microsoft microsoft locked and limited conversation to collaborators Jun 10, 2024
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.

Debugger for language not set when in a diff editor for debugging supported language

3 participants