I am trying to get call stack and variables' state inside OpenSfM (in particular in bundle_adjuster.cc / BundleAdjuster::Run) with VS Code debugger. So I added
def configure_c_extension():
"""Configure cmake project to C extension."""
...
if sys.platform == "win32":
cmake_command += [
"-DVCPKG_TARGET_TRIPLET=x64-windows",
"-DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake",
]
else:
cmake_command += ["-DCMAKE_BUILD_TYPE=RelWithDebInfo"]
subprocess.check_call(cmake_command, cwd=targetDirName)
into setup.py and rebuilt. Produced opensfm/py* are very big, e.g. pybundle.cpython-38-x86_64-linux-gnu.so is 120 MB now, while before it was 1.3 MB. I setted up debugging in VS Code with
configurations in launch.json, I can debug Python code and can stop C++ code. But when it should show OpenSfM's call stack, I only see one line, [Unknown/Just-In-Time compiled code].
Tried debugging inside Docker through SSH and directly inside miniconda, result is the same.
Ubuntu 20.04, fresh VS Code, fresh OpenSfM main branch (commit b760b21f).
I am trying to get call stack and variables' state inside OpenSfM (in particular in bundle_adjuster.cc / BundleAdjuster::Run) with VS Code debugger. So I added
def configure_c_extension(): """Configure cmake project to C extension.""" ... if sys.platform == "win32": cmake_command += [ "-DVCPKG_TARGET_TRIPLET=x64-windows", "-DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake", ] else: cmake_command += ["-DCMAKE_BUILD_TYPE=RelWithDebInfo"] subprocess.check_call(cmake_command, cwd=targetDirName)
into setup.py and rebuilt. Produced opensfm/py* are very big, e.g. pybundle.cpython-38-x86_64-linux-gnu.so is 120 MB now, while before it was 1.3 MB. I setted up debugging in VS Code with
configurations in launch.json, I can debug Python code and can stop C++ code. But when it should show OpenSfM's call stack, I only see one line, [Unknown/Just-In-Time compiled code].
Tried debugging inside Docker through SSH and directly inside miniconda, result is the same.
Ubuntu 20.04, fresh VS Code, fresh OpenSfM main branch (commit b760b21f).