作者:公寓朝仓音梦NQey | 来源:互联网 | 2022-12-07 18:05
我正在尝试调试(命中断点)一个python脚本,它通过C#中的新进程执行.
我已经安装了Child Process Debugging Power工具,因为该工具据说允许人们这样做.
根据其文档,它需要两件事:
必须使用本机调试enigne调试父进程
父进程必须使用CreateProcess或CreateProcessAsUser Win32 API启动子进程.
我的流程创建如下:
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)
在我的项目中,我还启用了本机代码调试.(Req.1)
我还在我的符号列表中包含了python.pdb和python36.pdb.但似乎我找不到python3.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时,这不包括在内,我似乎没有在其他任何地方找到它.
我正在使用2017年的视觉工作室,没有断点被击中.