Skip to content

Play a sound whenever a breakpoint is hit. - #140044

Merged
Henning Dieterichs (hediet) merged 8 commits into
mainfrom
hediet/breakpointHitSounds
Jan 7, 2022
Merged

Henning Dieterichs (hediet) merged 8 commits into
mainfrom
hediet/breakpointHitSounds

Conversation

@hediet

Copy link
Copy Markdown
Member

This PR fixes #135908
Use "audioNotifications.enabled": true to enable the feature.
Use "audioNotifications.breakpointHit": false to enable audio cues for breakpoints.

Later TODO's:

  • Better and more consistent terminology
  • Sounds when inline completions are available

@isidorn Isidor Nikolic (isidorn) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Awesome work!
I have done an initial review. Once you tackle this I can try it out and provide more feedback.
Thanks a lot

}));

this.rawListeners.push(this.raw.onDidStop(async event => {
if (event.body.reason === 'breakpoint') {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The current problem with the breakpoints is not that the users are unaware that the breakpoint is hit, but that the breakpoint is on a line.

So the logic should be different.
We need a line change listener, and on each line change to check if a breakpoint is on a line. If it is we play the sound. We will do the same approach with errors.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I suggest to introduce a new minimalistic WorkbenchContribution just for this

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ah, I misunderstood the problem. But #135908 is about playing a sound when a breakpoint is hit.

@isidorn Isidor Nikolic (isidorn) Jan 4, 2022 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Henning Dieterichs (@hediet) good point. Yeah I then agree we also want this.
I feel like this is mostly requested by non screen reader users. And what I mention is requested by screen reader users.
So in the end we will need both, and the sound we play for those might be different. Though to start we can play the same sound.

@bpasero Benjamin Pasero (bpasero) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I believe this would not work from our real builds that use a stripped down version of ffmpeg, i.e. we ship no codecs, Robo (@deepak1556) would know for sure.

@hediet

Copy link
Copy Markdown
Member Author

I believe this would not work from our real builds that use a stripped down version of ffmpeg, i.e. we ship no codecs, Robo (@deepak1556) would know for sure.

I think his comment here means webm should be supported.

@bpasero

Copy link
Copy Markdown
Contributor

I think a service for this is overkill, why not dom.play similar to dom.download?

@deepak1556

Copy link
Copy Markdown
Collaborator

Yup webM is supported in our product build with the slimmed down ffmpeg build.

Comment thread src/vs/base/common/event.ts Resolved
@hediet
Henning Dieterichs (hediet) deleted the hediet/breakpointHitSounds branch January 7, 2022 12:51
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 21, 2022
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.

Breakpoint Alarm / Sound

5 participants