Setting breakpoint in editor does not work after updating extenson to VS2022

Sajith 11 Reputation points
2022-03-14T14:18:39.727+00:00

We have a Visual Studio extension that implements a custom editor, language service and a debugger.
After updating the extension for VS2022, not able to set a breakpoint in editor.
We have implemented a custom language service and
and on setting a breakpoint in editor, ValidateBreakpointLocation gets called and processed correctly.
But breakpoint is not getting set and gives error-
“A breakpoint could not be inserted at this location. Operation not supported. Unknown error: 0x80070057.”

This works fine in VS2019.

Community Center Not monitored
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    2022-03-15T03:30:29.343+00:00

    Hi @Sajith ,

    Welcome to Microsoft Q&A!

    Could you share me your specific version of VS2022?

    Please relaunch your Visual Studio and try to rebuild your project.

    Besides, please check if you set a breakpoint span that contains the specified line and column.
    https://learn.microsoft.com/en-us/dotnet/api/microsoft.visualstudio.textmanager.interop.ivslanguagedebuginfo.validatebreakpointlocation?view=visualstudiosdk-2022
    https://stackoverflow.com/questions/27499129/allowing-to-insert-breakpoint-in-visual-studio-editor-extension

    Sincerely,
    Anna
    *
    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.