How Can I debug the Module and create the personally Module?

Hello everyone.

I succeeded in building Slicer master branch without SimpleITK because I can’t to solve the fix error(MSB 8066 in SimpleITK.sln) during build Slicer.
and I want to debug each module and I create the module that Augmented Reality module with Camera(3D,Stereo,Web,Usb,etc…).
I build the Slicer.exe but I couldn’t debug the module…
I want to debug each module(ex Volume,Markup,VolumeRendering,Segmentation,etc…) in Slicer because I don’t know how each module works.

Is it right to make a module using Qt Designer?? I am studying Qt.(I usually coded using only c++.)
and I’m curious about the difference between SlicerIGT and OpenIGT and their installation and usage.

Thanks for reading.

See debugging instructions here:

Thanks :slight_smile:
I know that among the Add Module to Extension options, scripted is python is the base. Referring to this, I made it into a scripted type and modified the UI, but I couldn’t modify it because the console window was quickly opened and closed. (python3.7 is installed.) And then, I selected Add Module to Extension, and created the type to write c++. It’s made like a picture, but I don’t add and automatically load modules like type scripted, so what should I do? As you can see in the picture below, I tried to add a createable path through Extension in Edit-Application Setting, but it doesn’t come out. It doesn’t come up even if you do the Selection Extension of the Extension Wizard.Do I have to build a module separately through CMake?
I want code correction and ui correction.

If you develop a module in C++ then you need to build your extension. You can test your module by following these instructions.

Thanks!! I will try now :slight_smile:

Hello,I built a building referring to here.and I added path.
Edit-Application Settings-modules also added the path of qt-loadable-module-deubg of the path created by building a sln made of cmake. However, the module cannot be found on the Slicer.
Did I do something wrong?

Is your module DLL present in the Debug folder that you added?

yes, These are the files in the directory.

It looks good, your module is loaded then. If not, then you can find an error message in the application log.

Test4 is scripted type. I created lodable type via extension wizard and added the path the picture above but I can’t find Test3 module, How can I check the application log??

See here: Get Help — 3D Slicer documentation

Thanks :slight_smile:
When I try to debug only the module, if I enter this command on the path, it comes out like this, but how do I solve it?
And what is SlicerRT??
Here is It mentions SlicerRT here
c:\D\S4D\Slicer-build>Slicer.exe --VisualStudio --launcher-no-splah --launcher-additional-settings C:\Slicer_Module\bin\inner-build\AdditionalLauncherSettings.ini C:\Slicer_Module\bin\inner-build\Test3.sln

Thanks @lassoan .
I succeeded to add extension that I made for test. :slight_smile:

1 Like

Hello lassoan ,
I am making my module with Extension Wizard (type:default, loadable).
If I make a module for Debug and add a module from a Slicer built with Debug, the module will be recognized normally, but it will not be built upon release from the solution of the same module.
Conversely, when adding a module built with Debug, it adds and operates normally.
Other test cases, modules built from Slicer to Release to Debug cannot be added.
In addition, you can add the module created through the extension wizard in the Release Slicer after building it as release, but it is not recognized if you build the module with debug and add it.
In order to develop a module that can be added to a typical user’s Slicer, what kind of environment and how do I set the type of module?

I checked that module(build-release) is added to stable Slicer4.13, but not added to Slicer Debug Solution(S4D\slicer-build\Slicer.exe).

You need to have a completely different build tree for release and debug mode builds.

During development, I mostly use debug builds, which run slower but allow me to step through the code using a debugger. Release are useful for testing the application at full speed and to deployable to end users.

I understood that developing it as Debug when developing and Reesae when distributing it.
When I use debug, Can I debug basic module is VS studio??

Yes, you debug all the Slicer core modules and your custom modules the same way. Detailed instructions are available here: C++ debugging on Windows — 3D Slicer documentation

Slicer Debug Directory : S4D\slicer-build

If I want to debug the Segmentation or Segmentation Editor following this comment…

.\S4D\Slicer-build\Slicer.exe --VisualStudio --launcher-no-splash --launcher-additional-settings
./SlicerRT_D/inner-build/AdditionalLauncherSettings.ini c:\d_Extensions\SlicerRT_D\inner-build\SlicerRT.sln

I can find my moudle.sln in my module directory but I can’t find any other loadable-module .sln and Segmentation.sln and in loadable-module dirctory…

That’s fine, it does not matter which files you see in the project tree in Visual Studio. You can load any of the .cxx files add breakpoints in them, and execution will stop at the breakpoints.