Repository navigation
Open
Labels
questionQuestion on using TaichiQuestion on using Taichi
Description
Hi everyone, I now want to develop and debug the Taichi project on Windows through Visual Studio 2022. After I built the project using the debug configuration documentation on the Taichi website: https://docs.taichi-lang.cn/docs/windows_debug, a puzzling exception appeared in Step 4.
The project was successfully built at run time without error, but the debugging did not break at the breakpoint, but directly exited.
11:16:57:106 “python.exe”(Win32): 已加载“D:\development\anaconda\python.exe”。已加载符号。
11:16:57:106 “python.exe”(Win32): 已加载“C:\Windows\System32\ntdll.dll”。
11:16:57:106 “python.exe”(Win32): 已加载“C:\Windows\System32\kernel32.dll”。
11:16:57:106 “python.exe”(Win32): 已加载“C:\Windows\System32\KernelBase.dll”。
11:16:57:610 “python.exe”(Win32): 已加载“C:\Windows\System32\ucrtbase.dll”。
11:16:57:610 “python.exe”(Win32): 已加载“D:\development\anaconda\python39.dll”。已加载符号。
11:16:57:610 “python.exe”(Win32): 已加载“D:\development\anaconda\vcruntime140.dll”。
11:16:57:610 “python.exe”(Win32): 已加载“C:\Windows\System32\ws2_32.dll”。
11:16:57:610 “python.exe”(Win32): 已加载“C:\Windows\System32\rpcrt4.dll”。
11:16:57:610 “python.exe”(Win32): 已加载“C:\Windows\System32\version.dll”。
11:16:57:610 “python.exe”(Win32): 已加载“C:\Windows\System32\msvcrt.dll”。
11:16:57:610 “python.exe”(Win32): 已加载“C:\Windows\System32\advapi32.dll”。
11:16:57:610 “python.exe”(Win32): 已加载“C:\Windows\System32\sechost.dll”。
11:16:57:610 “python.exe”(Win32): 已加载“C:\Windows\System32\cryptsp.dll”。
11:16:57:610 “python.exe”(Win32): 已加载“C:\Windows\System32\rsaenh.dll”。
11:16:57:610 “python.exe”(Win32): 已加载“C:\Windows\System32\cryptbase.dll”。
11:16:57:610 “python.exe”(Win32): 已加载“C:\Windows\System32\bcryptprimitives.dll”。
11:16:57:648 “python.exe”(Win32): 已加载“C:\Windows\System32\kernel.appcore.dll”。
11:16:57:648 线程 49892 已退出,返回值为 1 (0x1)。
11:16:57:648 线程 13100 已退出,返回值为 1 (0x1)。
11:16:57:648 线程 29124 已退出,返回值为 1 (0x1)。
11:16:57:648 程序“[1776] python.exe”已退出,返回值为 1 (0x1)。Is there something wrong with my process of building Taichi? Here's how I built from the source code:
The LLVM Debug build process is as follows:
cmake ..\llvm\ -G "Visual Studio 17 2022" -A x64 -DLLVM_ENABLE_RTTI:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="X86;NVPTX" -DLLVM_ENABLE_ASSERTIONS=ON -Thost=x64 -DLLVM_BUILD_TESTS:BOOL=OFF -DCMAKE_INSTALL_PREFIX=installed -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL -DCMAKE_CXX_STANDARD=17git clone --recursive https://github.com/taichi-dev/taichi
cd taichi
$env:TAICHI_CMAKE_ARGS += " -DTI_WITH_VULKAN:BOOL=ON -DTI_WITH_CUDA:BOOL=ON"
$env:DEBUG = 1 # Uncomment it if you wish to keep debug information.
$env:TAICHI_USE_MSBUILD = 1
python build.py --shell
# 指定自己生成 LLVM Debug 版本路径后执行
python setup.py developThen I open ... /taichi/_skbuild/win-amd64-3.9/cmake-build/taichi. sln, the debugging environment is as follows:
The result is above!
Metadata
Metadata
Assignees
Labels
questionQuestion on using TaichiQuestion on using Taichi
Type
Projects
- StatusShow more project fieldsUntriaged

Activity
xuanranxiaoshi commentedon Nov 12, 2024
I found a new problem.
After building Taichi in the above way, I execute it directly on the command line:
(tiDemo.py is a simple taichi sample program)
Generate an error:
I installed 'vc_redis.x64.exe' but still did not solve the problem.
I'm wondering how compiling Taichi in this way can be imported by a Python program?
xuanranxiaoshi commentedon Nov 13, 2024
Now I have solved the problem:
ImportError: DLL load failed while importing taichi_python: The specified module could not be found.Instead of compiling Taichi in Debug mode, I set the environment variable to 0;
However, debugging in VS 2022 still reported an error: the python.c source file could not be found.
PDE26jjk commentedon Jan 8, 2026
Have you solved the issue of breakpoint? I have same problem.
PDE26jjk commentedon Jan 8, 2026
I asked Claude, and following his advice seems to have fixed the breakpoint issue. But now I have to manually copy the generated pyd and pdb files into taichi\python\taichi_lib\core after compiling. I'm looking for a solution.
Here is Claude's output content