<div dir="ltr"><div>I regularly debugging C# code called from python side using pythonnet. So something is likely wrong in your settings.</div><div><br></div><div>Here is how you set debugger engines (see picture in the comments):</div><div><a href="https://github.com/Microsoft/PTVS/issues/674">https://github.com/Microsoft/PTVS/issues/674</a><br></div><div><br></div>This mailing list is super-slowly approved for new messages. You may get much faster and better response on PTVS issue tracker:<div><div><a href="https://github.com/Microsoft/PTVS/issues/new">https://github.com/Microsoft/PTVS/issues/new</a></div><div>Just provide Microsoft Python team with reproducible example. Also mention what symbols you see in Debugger "Modules" window.<br></div><div><div><br></div><div>If issue is very specific to pythonnet and works on ironpython, then you can use pythonnet issue tracker:</div><div><a href="https://github.com/pythonnet/pythonnet/issues/new">https://github.com/pythonnet/pythonnet/issues/new</a> <br></div><div><br></div><div>Note that PTVS has very specialized code for debugging IronPython, while pythonnet debugging happens through CPython debugger.</div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 14, 2016 at 4:46 AM, Pochon-Guérin Ludovic <span dir="ltr"><<a href="mailto:Ludovic.Pochon-Guerin@statkraft.com" target="_blank">Ludovic.Pochon-Guerin@statkraft.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thank you for your answer,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I tried all of this without success.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">What do you mean by “</span>select manually managed debugger”?<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Please can you clarify if it is possible to stop at breakpoints in C# code when called from Python code (using python dot net)?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thanks<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Ludovic<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> PythonDotNet [mailto:<a href="mailto:pythondotnet-bounces%2Bludovic.pochon-guerin" target="_blank">pythondotnet-bounces+ludovic.pochon-guerin</a>=<a href="mailto:statkraft.com@python.org" target="_blank">statkraft.com@python.org</a>]
<b>On Behalf Of </b>Denis Akhiyarov<br>
<b>Sent:</b> 8. juni 2016 08:32<br>
<b>To:</b> A list for users and developers of Python for .NET<br>
<b>Subject:</b> Re: [Python.NET] Debugging .NET assembly from Python 3<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">There are many conversations (both codeplex and github) recorded in issue tracker for PTVS about debugging pythonnet code.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">The starting point is to ensure that you are on .NET 4+, select manually managed, native, and python debugger engines. Also make sure that managed compatibility mode is not selected. Finally make sure that your python debug symbols are
available to PTVS/VS for cross-language debugging.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<div>
<p class="MsoNormal">Note that currently the PTVS remote debugger is not working for pythonnet when debugging python code.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Tue, Jun 7, 2016 at 3:20 AM, Pochon-Guérin Ludovic <<a href="mailto:Ludovic.Pochon-Guerin@statkraft.com" target="_blank">Ludovic.Pochon-Guerin@statkraft.com</a>> wrote:<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Using Visual Studio 2015, I have a Python project and a C# DLL project.<u></u><u></u></p>
<p class="MsoNormal">From the Python code, I import and call functions from the C# class.<u></u><u></u></p>
<p class="MsoNormal">When running in Debug, I am able to stop at breakpoints in the Python code, but not in the C# code.<u></u><u></u></p>
<p class="MsoNormal">The debugger jumps over the calls as if no symbols were loaded.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">I would like to know if it is possible to stop at breakpoints in the C# code and how to setup it in Visual Studio.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">This feature works when using IronPython, but we want to use PythonDotNet from Miniconda3.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><span lang="NO-BOK">Thanks</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="NO-BOK" style="color:#888888">Ludovic</span><span style="color:#888888"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#888888"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#888888"> <u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><br>
_________________________________________________<br>
Python.NET mailing list - <a href="mailto:PythonDotNet@python.org" target="_blank">PythonDotNet@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/pythondotnet" target="_blank">https://mail.python.org/mailman/listinfo/pythondotnet</a><u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
<br>_________________________________________________<br>
Python.NET mailing list - <a href="mailto:PythonDotNet@python.org">PythonDotNet@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/pythondotnet" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/pythondotnet</a><br></blockquote></div><br></div>