Home > Software engineering >  MAUI debugging: cannot step into dependency project
MAUI debugging: cannot step into dependency project

Time:10-16

I'm developing a mobile app using MAUI on Visual Studio 2022. I have a main project which includes most functionality for both android and ios. Additionally I have created a second project targeting net6.0-android, which implements some android-specific functionality. It is used by the main project.

Problem: When I set breakpoints in the second project, the debugger breaks on the calling line in the main project. I cannot step in the second project. What could cause this problem and how to solve it?

EDIT: Repro steps:

  1. Create a new maui project A
  2. Create another project B in the same solution and target net6.0-android
  3. Reference project B in project A
  4. Use some function from B in project A and set breakpoint inside that function in B
  5. Execution will break on the calling line in project A, not on the actualbreakpoint in project B

CodePudding user response:

Following your steps I tested the code, and the problem happened just as you said. I searched relevant information about it. Unfortunately, that is not recommended to do with it by adding a new project to the solution.

You can use Invoke platform code that MAUI provided. Also you can refer to this example.

CodePudding user response:

I have the same problem. I have a blazor lib used by au .net MAUI App. When I set a breakpoint on lib code. the breakpoint is never chieved. And i have a green arrow before the line of code which call lib procedure. I works fine with windows platform.

  • Related