代码之家  ›  专栏  ›  技术社区  ›  VegardKT

使用子进程调试工具混合模式调试Python/C

  •  6
  • VegardKT  · 技术社区  · 6 年前

    我已经安装了 Child Process Debugging Power tool 因为那个工具可以让人这么做。

    1. 父进程必须使用本机调试引擎进行调试

    我的流程如下:

    ProcessStartInfo startInfo = new ProcessStartInfo();
    Process p = new Process();
    
    startInfo.CreateNoWindow = true;
    startInfo.UseShellExecute = false;
    startInfo.RedirectStandardOutput = false;
    startInfo.RedirectStandardError = true;
    startInfo.RedirectStandardInput = false;
    ...
    p.StartInfo = startInfo;
    p.EnableRaisingEvents = true;
    p.Start();
    

    据我所知,只要我用

    UseShellExecute = false; 
    

    进程应该以CreateProcess启动。(要求。2个)

    我的符号列表中还包括python.pdb和python36.pdb。

    'python.exe' (Win32): Loaded 'C:\...\Python36\python.exe'. Symbols loaded.
    'python.exe' (Win32): Loaded 'C:\...\Python36\python36.dll'. Symbols loaded.
    'python.exe' (Win32): Loaded 'C:\...\python3.dll'. Cannot find or open the PDB file.
    

    当我安装带有调试符号的python时,它并没有包括在内,而且我似乎在其他地方也找不到它。

    我使用的是visual studio 2017,没有断点。

    1 回复  |  直到 6 年前
        1
  •  0
  •   VegardKT    6 年前

    如果有人无意中发现这篇文章,请快速更新。

    我联系了这个工具的创建者,尽管它的描述可能表明我在这里要做的应该是有效的,但它没有。