Share via

Stepping through python code called from C#

Conrad Yoder 1 Reputation point
2021-06-28T17:50:34.89+00:00

I've had some code thrown over the wall to me (can't contact the original developer) which is a .NET 5.0 C# project, which calls python code using ProcessStartInfo. I tried to set a breakpoint in the python code but VS gives the warning

The breakpoint will not currently be hit. No symbols have been loaded for this document.

The Visual Studio Python development workload is installed. (Using VS Pro 2019 16.10.2.) I am experienced with C# development, but less so with python. Is this even possible?

Developer technologies | Visual Studio | Debugging
Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 34,836 Reputation points Microsoft External Staff
    2021-06-29T03:06:32.097+00:00

    Hello @Conrad Yoder ,

    Welcome to Microsoft Q&A forum.

    Please check these troubleshooting steps which Gregg mentioned here: Troubleshooting steps for when you see “No symbols have been loaded for this document”.

    Also please try to enable Just My Code option from Tools > Options > Debugging > General > Enable Just My Code, then Clean > Rebuild your solution, and after that debug it again.

    Besides, I’m not sure what your project(folder) structure is, you need to make sure that the .pdb file has been copied in Debug folder.

    Best Regards,
    Tianyu

    • If the answer is helpful, please click "Accept Answer" and upvote it.
      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.

    Was this answer helpful?


Your answer

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