4
Hello Jaya Prakas,
Please check below point,

set it to Debug,
- Set Debug mode as above
- clean the solution
- Build solution again
- Attach process for your project
if you set all above step properly then debugger should hit.
2
If breakpoints are not hitting correctly in Visual Studio, it could be due to various reasons. Here are some possible solutions to try:
-
Ensure that you have built your solution in Debug mode. If the solution is built in Release mode, breakpoints will not be hit.
-
Check that the code you are trying to debug is being executed. If the code is not being executed, the breakpoint will not be hit. You can use debug statements or logging to ensure that the code is being executed.
-
Make sure that the breakpoint is set on a valid line of code. If the breakpoint is set on a blank line, comment line, or on a line that has not been executed, it will not be hit.
-
Verify that the solution and project configurations are set up properly. Make sure that the debugger is attached to the correct process and that the solution is configured to debug the correct project.
-
Clean and rebuild the solution to ensure that all the latest changes are built and the debugging symbols are generated.
-
Check that there are no optimization settings in place that could be preventing the debugger from working properly. In some cases, certain optimization settings can interfere with debugging.
-
Try resetting the Visual Studio settings to their defaults by going to Tools > Import and Export Settings > Reset all settings.
If none of these solutions work, you may need to investigate further or seek help from a more experienced developer.
