none
Breakpoints are working, but code skips System.Diagnostics.Debug.Print commands RRS feed

  • Question

  • I have VSTO running on two machines, one of them will not run the debug commands.

    I recall some funny switch setting, but cannot find it.

    It is running in debug mode. The code is ignoring all the debug commands.

    Help

    Thanks

    Adam


    Adam

    Sunday, December 31, 2017 1:54 PM

Answers

  • Hi Adam,

    To check whether it is related with Project code, will this issue exist if you create a new project with Debug.Print?

    I suggest you follow options below:

    1. Clean solution, restart VS, rebuild the solution

    2. Close Project, delete the .suo file, and re-open the project

    3. Reset VS settings as below

    How do I truly reset every setting in Visual Studio 2012?

    https://stackoverflow.com/questions/17203820/how-do-i-truly-reset-every-setting-in-visual-studio-2012

    If it did not work, I would suggest you uninstall and reinstall the VS.

    Best Regards,

    Tao Zhou


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by AuroraMan1 Monday, January 1, 2018 3:00 PM
    Monday, January 1, 2018 4:15 AM

All replies

  • Hi Adam,

    >> one of them will not run the debug commands

    How did you debug your project? What do you mean it did not run?

    Do you mean you run VSTO from VS on two machines, and one of them did not run “System.Diagnostics.Debug.Print”?

    Could you share us a simple project and the expected result you want?

    Best Regards,

    Tao Zhou


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, January 1, 2018 3:08 AM
  • The first screen shot is the breakpoint in the code. the second is what it stops on.

    The system.Diagnostic lines are being ignored.

    When I run on the other machine it stops on the debug lines. and prints to the output window.

    Adam


    Adam

    Monday, January 1, 2018 4:01 AM
  • Hi Adam,

    To check whether it is related with Project code, will this issue exist if you create a new project with Debug.Print?

    I suggest you follow options below:

    1. Clean solution, restart VS, rebuild the solution

    2. Close Project, delete the .suo file, and re-open the project

    3. Reset VS settings as below

    How do I truly reset every setting in Visual Studio 2012?

    https://stackoverflow.com/questions/17203820/how-do-i-truly-reset-every-setting-in-visual-studio-2012

    If it did not work, I would suggest you uninstall and reinstall the VS.

    Best Regards,

    Tao Zhou


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by AuroraMan1 Monday, January 1, 2018 3:00 PM
    Monday, January 1, 2018 4:15 AM
  • Tao, That resolved the issue.

    Thanks !


    Adam

    Monday, January 1, 2018 3:00 PM