
The Visual Studio Code debugger uses the project directory.The Visual Studio 2019 debugger uses the executable directory.The issue stems from the fact that Visual Studio Code and Visual Studio 2019 use different default values for "working directory" when debugging. Start debugging by choosing Start debugging in Edit menu.In the last article, I showed what appeared to be a bug in the Visual Studio Code debugger and the. vtkMRMLSceneImportTest for project MRMLCoreCxxTests) followed by additional arguments (if any). In Command Arguments, type the name of the test (e.g. Go to the project debugging properties (right click -> Properties, then Configuration Properties/Debugging) Specify test name and additional input arguments: Make the project the startup project (right-click -> Set As Startup Project). To debug a test, find its project in the Solution explorer tree. See general information about running tests here.


Once VisualStudio is open with the Slicer environment loaded, it is possible to run and debug tests. To avoid this, you can use a script to complete the build process and then re-start the Visual Studio.įor more debugging tips and tricks, check out this page. Note that because CMake re-creates the solution file from within the build process, Visual Studio will sometimes need to stop and reload the project, requiring manual button pressing on your part (just press Yes or OK whenever you are asked). Run Slicer in debug mode by Start Debugging command (in Debug menu). Slicer-build/bin/Debug/SlicerApp-real.exe To debug in an extension’s solution: set ALL_BUILD project as startup project and in project settings, set Debugging / Command field to the full path of SlicerApp-real.exe - something like. In Solution Explorer window in Visual Studio, expand App-Slicer, right-click on SlicerApp (NOT qSlicerApp) and select “Set as Startup Project” SlicerRT_D/inner-build/AdditionalLauncherSettings.ini c:\d\_Extensions\SlicerRT_D\inner-build\SlicerRT.sln \S4D\Slicer-build\Slicer.exe -VisualStudio -launcher-no-splash -launcher-additional-settings.
