I need help with debugging process of the SlicerVirtualReality extension. First things first… what I managed to do:
Cloned 3D Slicer repo and built it (debug).
Tried running 3D Slicer which was ok.
Tried to debug it and it was also ok.
Then I cloned the SlicerVirtualReality repo and built it (debug).
Tried SlicerWithSlicerVirtualReality.exe and it works fine.
Created a BAT file containing this: D:\Slicer3D_git\build_debug\Slicer-build\Slicer.exe --VisualStudio --launcher-no-splash --launcher-additional-settings D:/Slicer_plugins/SlicerVirtualReality/build_debug/inner-build/AdditionalLauncherSettings.ini D:/Slicer_plugins/SlicerVirtualReality/build_debug/inner-build/SlicerVirtualReality.sln
Run the BAT file, VS project opens, set the slicer-real.exe path as a command in debugging project settings, start project debug which opens up the 3D Slicer app BUT without the SlicerVirtualReality extension present.
Can anyone guess what am I missing? Maybe something in CMake?
That’s how the 3D Slicer settings looks like when I open it up using SlicerWithSlicerVirtualReality.exe file. You can see that the extension is there (icons on top left corner + Virtual Reality module which is selected) but no modules folders added.
There is also one error in the Python console.
Starting the debug session in VS project (SlicerVIrtualReality) opens up 3D Slicer with the same python console error but without the extension
This error also appears for me using the latest revisions.
That executable adds the necessary paths to include the extension. However, when you debug you need to use the SlicerApp-real.exe, which is not a launcher, so it does not add any paths. So you need to make sure the application loads the extension.
You do use the launcher when you start Visual Studio, but that is the basic Slicer launcher. Maybe you can use the SlicerWithSlicerVirtualReality.exe for starting VS and then not add the module directories, bue I haven’t tried that personally.