debugging maui android application problem

Haviv Elbsz 2,071 Reputation points
2023-06-15T09:29:13.9366667+00:00

Hello all. the debugger throw index out exception at this statement digits[ m[x][y] ] because the value of m[x][y] = -1. and I have m[x][y] in many places. I am trying to find the m[x][y] that gets negative value I tried the the first running one without success. Is visual studio debugger can help here? if someone can help in this. Thank you very much.

Developer technologies Visual Studio Debugging
{count} votes

Accepted answer
  1. Tianyu Sun-MSFT 34,436 Reputation points Microsoft External Staff
    2023-06-16T07:04:07.23+00:00

    Hello @Haviv Elbsz ,

    Welcome to Microsoft Q&A forum.

    Does setting breakpoints conditions and actions meet your requirements?

    For example, set the breakpoints and right-click the breakpoint, select Conditions…, Conditional Expression, Is true, m[x][y]==-1, and set Actions > Show a message in the Output Window: The value of x,y is {x}, {y}(or customize some other actions and conditions). Then run your project. check the VS Output Window(select Debug in Show output from box in Output Window), and verify the message.

    Sincerely,

    Tianyu


    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.

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.